-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
COMPAT: implement visit_Constant for 3.8 compat #28101
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
COMPAT: implement visit_Constant for 3.8 compat #28101
Conversation
Do we plan to do a 0.25.2, or keep open the option? (basically meaning: do we keep backporting for now?) If so, this would be a candidate I think. |
would be +1 on. potential 0.25.2 esp if we can have 3.8 support in it |
According to https://www.python.org/dev/peps/pep-0569/, the release date is targeted for October 21. I'm not sure we'll get 1.0 out by then so a (conservative) 0.25.2 makes sense. Just plan to backport 3.8 fixes and 0.25 regressions? |
FYI, I need to read through https://bugs.python.org/issue36917 a bit more to make sure this is a valid fix. So consider this WIP for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm for 0.25.2
Once we get to 3.8 as a minimum we could get rid of the other types represented here right? If so maybe worth a comment of some sort |
(cherry picked from commit 582e8967ba64c47d188e4849a897ec599e06b1e6)
(cherry picked from commit 42893af2eef3b5ac4a342c5a7a287b4a0407005f)
(cherry picked from commit ffe9b6fa7bf86a99b32fc50b131bfab62005f49d)
(cherry picked from commit ca34ccddb47a102b25a2f23abeac28bc77d121ac)
Updated with all the tests that were failing for me locally with 3.8. Note that we can't test against 3.8 beta3 because a segfault would crash the test workers (I think). That's fixed in python/cpython#15390 which will be in beta 4. |
I'm not sure exactly which ones can be removed once 3.8 is our min version. I don't think I understand this code / the changes well enough to say. |
Sounds good. Can cross that bridge when we get there |
Unless someone else has objections I so go ahead and merge |
* COMPAT: implement visit_Constant for 3.8 compat * Updated tests for new error messages.
* COMPAT: implement visit_Constant for 3.8 compat * Updated tests for new error messages.
All dependencies are changed to >= dependencies, rather than ==, which make climada suitable for use as a library. In addition, the following changes were made to ensure compatability with lab: - Removed cartopy as a requirement, since it tends to break automation with its requirements on numpy at install time. - Downgrade the version of the following packages to match lab: - cython - geopandas - matplotlib - nbformat - numpy - pillow - xlrd - xlsxwriter - pandas - Change the specified dependence of proj==7.0.0 (which is a c library) to pyproj>=2.6, the python package the exposes proj API bindings in python. - Pin the following dependences (i.e. == instead of >=): - xarray==0.13.0 to stop it from bringing in a pandas>=0.25 dependency - gdal==3.0.4 version, since 3.0.4 is what ships with Ubuntu 20.04. Running higher versions causes compile time problems. - Include explicit dependencies on rtree (optional dep of geopandas) and fsspec (optional dep of dask) This change is not without impact. There are known test failures on the cannoncial lab setup (Ubuntu 20.04, Python 3.8, installed with rebuild-venv.sh), including: - TypeError: visit_Constant() got an unexpected keyword argument 'side' in pandas code. This is a known error with pandas 0.24 when running on python 3.8 which is fixed in 0.25.2. See discussion at: - https://bugzilla.redhat.com/show_bug.cgi?id=1746847 - pandas-dev/pandas#28101 - In pandas, either: AttributeError: 'Series' object has no attribute 'to_numpy' or AttributeError: module 'pandas' has no attribute 'arrays' Both of these refer to pandas functionality introduced in 0.24.0 that is used directly by CLIMADA. - ModuleNotFoundError: No module named 'pyepsg' 'pyepsg' is a wrapper tool that downloads epsg info from the web. This is explicitly excluded in order to prevent production instances from relying on a third party site. - When pandas is reading an excel file, it uses the xlrd library, which references the time.clock() API, which has been long deprecated and was completley removed in Python 3.8. Note that most of these errors could be resolved by bumping the pandas version to 0.25.2, a change which is pending further work in lab.
Closes #27261
xref https://bugs.python.org/issue32892