Skip to content

Resolve Python deprecation warnings introduced during the switch to Python 3.12 #3106

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Enhancement

The METbaseimage issue dtcenter/METbaseimage#30 and corresponding MET pull request #3105 upgraded from Python 3.10 to 3.12. As noted in this PR comment that introduced some Python deprecation compiler warning messages that apparently first appeared in Python 3.11:

  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.

This issue is to update Python embedding code in MET to address these deprecation warnings.

Time Estimate

1 day?

Sub-Issues

Consider breaking the enhancement down into sub-issues.
None needed

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

2702701 (NCAR base)

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as a MET-X.Y.Z version, Consider for Next Release, or Backlog of Development Ideas
  • For a MET-X.Y.Z version, select the MET-X.Y.Z Development project

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: MET-X.Y.Z Development project for development toward the next official release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions