Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python2 support #415

Open
rs028 opened this issue Mar 14, 2020 · 7 comments
Open

Drop Python2 support #415

rs028 opened this issue Mar 14, 2020 · 7 comments

Comments

@rs028
Copy link
Collaborator

rs028 commented Mar 14, 2020

Probably need to switch completely to Python3 at some point , instead of relying on __future__.

Python2 is being phased out in 2020 (https://www.python.org/doc/sunset-python-2/).

It also does not make sense to have two plotting scripts for python 2 and 3, when the actual difference between them is not the python version but that one uses numpy and the other uses pandas.

@rs028 rs028 added the to do label Mar 14, 2020
@spco
Copy link
Collaborator

spco commented Mar 16, 2020

As I understand it, the scripts using __future__ are compatible with both 2 and 3. We could remove the __future__ import line, and that would break the compatibility with 2, but that's really all.

@spco
Copy link
Collaborator

spco commented Mar 16, 2020

As for the plotting tools - yes, the _v2 is only python2 because of the print statement but that's it - we could add a __future__ import and change the print function and that would be both 2- and 3-compatible. the _v3 script is 3-only, but could have the same import to make it 2-compatible as well.

As you say, the naming is a bit odd if the real difference is pandas vs numpy. Do we want to keep both in, or slim it down to one and demand either numpy or pandas?

@rs028
Copy link
Collaborator Author

rs028 commented Mar 16, 2020

Yes, I suppose it won't matter to lose the support of python2 if it is going to be discontinued eventually. For the moment I think it is fine to keep it.

Re the plotting tools yes I agree, maybe I will just rename them and add import __future__, for the moment.

@spco
Copy link
Collaborator

spco commented Mar 16, 2020

For the moment I think it is fine to keep it.

Absolutely - there are far too many systems out there that still don't use python3, so for the sake of an extra few lines in our source code, keeping compatibility is worth doing.

Copy link
Collaborator Author

rs028 commented Mar 27, 2020

Python scripts are version independent now. Eventually will drop support for Python2.

@rs028 rs028 removed the to do label Jul 16, 2020
@spco
Copy link
Collaborator

spco commented Jan 6, 2021

Is this done, and can be closed? (or renamed to 'drop Python2 support')

@rs028
Copy link
Collaborator Author

rs028 commented Jan 6, 2021

I think now the python scripts are version independent. Not sure if they are all version 3. I meant to run 2to3 (https://docs.python.org/3/library/2to3.html) but I haven't had the chance yet. I will rename it as you suggest.

@rs028 rs028 changed the title Convert to Python3 Drop Python2 support Jan 6, 2021
@rs028 rs028 added the to do label Jan 8, 2021
@rs028 rs028 moved this to Minor Improvements in Roadmap Sep 22, 2022
@rs028 rs028 added this to Roadmap Sep 22, 2022
@rs028 rs028 modified the milestone: version 1.4 Oct 6, 2022
@rs028 rs028 added this to the version 1.4 milestone May 16, 2023
@rs028 rs028 modified the milestones: version 1.4, version 1.6 Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Minor Improvements
Development

No branches or pull requests

2 participants