-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
Python 2 doesn't support open(encoding=...)
Do we care about python 2 anymore? |
Yup - the CESM postprocessing utilities rely on the NCAR python library which is still based on 2.7. I have a library I'd like to add to the postprocessing scripts, and the plan is to have it depend on esmlab. |
I was surprised when I found out that https://github.com/NCAR/CESM_postprocessing is still 2.7. Earlier this year, xarray decided that it is dropping support for Python 2 by the end of 2018. Same thing for NumPy and Pandas. IMO, it makes sense to move forward with Python 3. To sound optimistic, I think we should focus on Python 3 and try to nudge the upstream development of Do we know whether there is some timeline for when ref: |
I can't imagine |
Why? Is there supposed to be some dependency on CESM post processing here? Why isn’t this independent of the other CESM code?
|
Unless we expect the CESM post-processing code to use esmlab in the near future, we should expect for them to upgrade to Python 3. Everyone should, at this point, and not making this Python 3 now adds extra work for us down the road. |
Are you asking why I think CESM postprocessing is going to continue to rely on a python 2 environment until after the CMIP analysis is done? Because it's tens of thousands of lines of code written and tested in python 2, and I think it's unreasonable for the few people developing it to make the python 3 conversion a priority.
I want to incorporate |
Then we need to make it compatible with both 2 and 3.
|
Look at the six package for help. |
Thanks! I understand that this is adding more work for minimal gain, but hopefully we don't have to go too far down this path before esmlab can go back to just being python 3-compatible. |
@mnlevy1981, this looks good to me! |
Python 2 doesn't support open(encoding=...)