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

update python minimum to 3.8 and update cprnc module. #4761

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jedwards4b
Copy link
Contributor

Update min python version to 3.8
Also updates to latest cprnc version

Test suite:
Test baseline:
Test namelist changes:
Test status: [bit for bit, roundoff, climate changing]

Fixes #4032

User interface changes?:

Update gh-pages html (Y/N)?:

@jedwards4b jedwards4b requested a review from rljacob March 6, 2025 19:59
@jedwards4b jedwards4b self-assigned this Mar 6, 2025
Copy link
Member

@rljacob rljacob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to update the cprnc submodule too?

@rljacob
Copy link
Member

rljacob commented Mar 6, 2025

Can you also update the error message as below?

   msg = (
        "Python "
        + str(major)
        + ", minor version "
        + str(minor)
        + " is required to run CIME. You have "
        + str(sys.version_info[0])
        + "."
        + str(sys.version_info[1])

@jedwards4b
Copy link
Contributor Author

Yes, I did intentionally update cprnc to the latest as well.

@rljacob
Copy link
Member

rljacob commented Mar 6, 2025

Since we test as far back as 3.8, does that mean those tests will fail as soon as we use some python thing that is NOT in 3.8? That would then tell us to either update this string again or try a different 3.8-friendly approach.

@rljacob rljacob changed the title update python minimum to 3.8 update python minimum to 3.8 and update cprnc module. Mar 6, 2025
@jedwards4b
Copy link
Contributor Author

That's almost correct - unfortunately this test is not comprehensive and the code that @jgfouca mentioned in system_tests_common.py is not exercised here.

@jgfouca
Copy link
Contributor

jgfouca commented Mar 6, 2025

We should probably just refactor that code instead of bumping up the min python. It's just one call to datetime.fromisoformat. The thing that I don't understand is that we see fails from py3.9 but the online documentation says support for fromisoformat was added in py.3.7. The error does go away if we use 3.11

@jedwards4b
Copy link
Contributor Author

Updated datetime to be backward compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to update minimum python version check
3 participants