-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix ccpp-framework errors with Python 3.11 #456
Conversation
…work with Python 3.11: global inline flags in the middle of regular expressions are deprecated since Python 3.6, and no longer supported in Python 3.11
Update. @DusanJovic-NOAA reported that this branch allows him to compile the ufs-weather-model with Python 3.11. |
@climbfuji I was able to replicate the error with python3.11, and confirm that this fixes the error: (scm_py311) framework/tests> setenv PYTHONPATH $PWD/../scripts (scm_py311) framework/tests> cd ../../ |
Thanks, @dustinswales! Dusan also ran the unit tests for the framework on his Fedora system, and they pass just like on my box with Python 3.10. I am currently running the ufs-weather-model regression tests on hera with intel against this branch. |
I successfully compiled ufs-weather-model on Fedora 37 (which uses python 3.11) |
Note. Full regression tests for ufs-weather-model passed on Hera with Intel. |
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.
Thanks for taking care of this!
Good to hear from you :-) |
all tests are done on ufs-community/ufs-weather-model#1522, can we start process to merge in this pr? |
@jkbk2004 Merged, thanks! |
Fix Python 3.11 errors as described in #457
With these changes, the error from
is fixed. I asked @DusanJovic-NOAA to test this branch with the ufs-weather-model on his Fedora 37 machine, which uses Python 3.11 as default, and I would like to ask @mkavulich @grantfirl @dustinswales to test this branch with their versions of Python in the CCPP-SCM, please.
As noted in #457, I cannot run the unit tests in ccpp-framework that require
pytest
. I ran the following unit tests successfully with Python 3.11:I then ran all unit tests successfully with the native Python 3.10 installation on Ubuntu 22.04:
User interface changes?: No
Fixes: #457 (to be confirmed)
Testing: see above