Skip to content

Conversation

georgemccabe
Copy link
Collaborator

@georgemccabe georgemccabe commented Mar 12, 2025

This PR will switch MET to using the v3.4 METbaseimage which contains Python 3.12.0, so MET will use Python 3.12.0 for Python Embedding.

Expected Differences

  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:
  • Ran unit tests in branch confirming (see this GHA workflow run)
  • Ran METplus use case tests with MET branch (only minimal diffs with lat/lon values were reported)
  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

Confirm all tests pass

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]

Note: I did NOT update the python requirements in the documentation because the changes to support Python 3.12.0 were backwards compatible with Python 3.10.4. The minimum requirements didn't change.

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the MET test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Will this PR result in changes to existing METplus Use Cases? [Yes]

    If yes, create a new Update Truth METplus issue to describe them.

dtcenter/METplus#2925

  • Do these changes introduce new SonarQube findings? [No]

    If yes, please describe:

  • Please complete this pull request review by 3/13/2025.

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.
    … python 3.10 to 3.12.0… python 3.10 to 3.12.0

@georgemccabe georgemccabe added this to the MET-12.1.0 milestone Mar 12, 2025
@github-project-automation github-project-automation bot moved this to 🩺 Needs Triage in METplus-6.1 Development Mar 12, 2025
@georgemccabe georgemccabe moved this from 🩺 Needs Triage to 🔎 In review in METplus-6.1 Development Mar 12, 2025
@georgemccabe georgemccabe marked this pull request as ready for review March 12, 2025 22:32
@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Mar 13, 2025

  • Recompiled myself on seneca using the updated development.seneca environment. It compiles fine, although there's a new warning discussed below.
  • Confirmed that all the GHA runs pass without error.
  • Searched through the code looking for reference to Python 3.10 or METbaseimage version 3.3 you may have missed and found the following:
    1. docs/Users_Guide/installation.rst references Python 3.10 -- SHOULD THIS BE UPDATED?
    2. internal/scripts/environment/development.seneca_intel_oneapi references Python 3.10 -- SHOULD THIS BE UPDATED?
    3. Several install files in internal/scripts/installation/config/install_met_env* reference Python 3.10, but presumably that's fine and @jprestop will update those env files only after updating the build environment there.
    4. We're still using METbaseimage v3.3 in many spots. Is there any good reason to retain these rather than switching them all to v3.4?
./internal/scripts/docker/Dockerfile.sonarqube:ARG MET_BASE_TAG=v3.3
./internal/scripts/docker/Dockerfile.copy:ARG MET_BASE_TAG=v3.3
./internal/scripts/docker/Dockerfile:ARG MET_BASE_TAG=v3.3
./.github/workflows/sonarqube.yml:          MET_BASE_TAG: v3.3
./.github/workflows/build_docker_and_trigger_metplus.yml:          MET_BASE_TAG: v3.3

Compiling on seneca using Python 3.12 results in 2 new categories of warnings.

  1. warning: ‘void Py_SetProgramName(const wchar_t*)’ is deprecated [-Wdeprecated-declarations] appears 20 times.
  2. warning: ‘void PySys_SetArgv(int, wchar_t**)’ is deprecated [-Wdeprecated-declarations] appears 6 times.

Some options about the first one are discussed in Stack Overflow. It will apparently be fully removed from Python 3.15.

Rather than holding up this PR, I will write up a separate issue to deal in MET to deal with those deprecation warnings that apparently first appeared in Python 3.11.

@georgemccabe
Copy link
Collaborator Author

@JohnHalleyGotway, I updated the references to METbaseimage v3.3 to v.3.4 and Python 3.10 to Python 3.12 in the files you listed. In the PR text, I mentioned that I did not update the version in the documentation because we have not increased the minimum python requirement from 3.10 since we confirmed that these changes still work using Python 3.10.

Thanks for creating an issue to address the deprecated Python/C++ code.

Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

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

I approve of these changes.

Thanks for the updates and confirming the detail about the documentation. As we move forward with future versions, seems like we really should test with Python 3.10 at some frequency to confirm that the minimum version continues to work.

@georgemccabe georgemccabe merged commit 42e6be4 into develop Mar 14, 2025
40 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 In review to 🏁 Done in METplus-6.1 Development Mar 14, 2025
@georgemccabe georgemccabe deleted the feature_baseimage_30_py3.12.0 branch March 14, 2025 16:21
metplus-bot added a commit to dtcenter/METplus that referenced this pull request Mar 14, 2025
georgemccabe pushed a commit to dtcenter/METplus that referenced this pull request Mar 14, 2025
metplus-bot added a commit to dtcenter/METplus that referenced this pull request Mar 19, 2025
georgemccabe pushed a commit to dtcenter/METplus that referenced this pull request Mar 19, 2025
hsoh-u pushed a commit that referenced this pull request May 15, 2025
hsoh-u pushed a commit that referenced this pull request May 15, 2025
hsoh-u pushed a commit that referenced this pull request May 15, 2025
hsoh-u pushed a commit that referenced this pull request May 16, 2025
hsoh-u pushed a commit that referenced this pull request May 16, 2025
hsoh-u pushed a commit that referenced this pull request May 16, 2025
hsoh-u pushed a commit that referenced this pull request May 16, 2025
hsoh-u pushed a commit that referenced this pull request May 16, 2025
hsoh-u pushed a commit that referenced this pull request May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

2 participants