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

Support Python 3.12 #3223

Merged
merged 14 commits into from
Nov 6, 2023
Merged

Support Python 3.12 #3223

merged 14 commits into from
Nov 6, 2023

Conversation

dopplershift
Copy link
Member

@dopplershift dopplershift commented Oct 12, 2023

Description Of Changes

  • Add 3.12 to CI and to package metadata
  • Fix metpy import failure on 3.12 due to now inability to effectively subclass Struct (GH-78724: Initialize struct.Struct in __new__  python/cpython#94532)
  • Fix Codecov not failing CI job when upload fails
  • Make sure nightly workflow runs on a PR if we change the underlying "unstable" workflow
  • Other CI workflow cleanup

Checklist

  • Fully documented

@dopplershift dopplershift added Area: Infrastructure Pertains to project infrastructure (e.g. CI, linting) Type: Enhancement Enhancement to existing functionality labels Oct 12, 2023
@dopplershift dopplershift requested a review from a team as a code owner October 12, 2023 20:55
@dopplershift dopplershift requested review from dcamron and removed request for a team October 12, 2023 20:55
@dopplershift
Copy link
Member Author

I fully expect this to fail at the moment due to:

@dopplershift dopplershift added this to the September 2023 milestone Oct 12, 2023
@dopplershift
Copy link
Member Author

Looks like we also need some 3.12 wheels (for Linux) for netcdf4-python.

@dopplershift dopplershift force-pushed the support-3.12 branch 10 times, most recently from 1e7b014 to 3dd466c Compare October 30, 2023 23:03
@dopplershift dopplershift added the hacktoberfest-accepted PRs accepted for contributions in hacktoberfest label Oct 31, 2023
In order to avoid bloating the Conda test matrix, cut down the "middle"
versions to split across Windows/MacOS. Also bump anything using 3.11
for 'latest' to now use 3.12.
Python 3.12 broke this and we can't subclass Struct and modify the
__init__ method. Get around this by switching to use composition instead
of inheritance.
Apparently this isn't the default behavior. Otherwise, the only way to
know is to notice slight coverage drops due to missing reports.
These are supposed to be the "permalinks", so let's use those. This is
attempting to address some failures on linkchecking.
This helps with memory usage when running generating all these plots.
While we were already using the right dependencies, this didn't do any
of the extra steps (e.g. downloading maps).
Due to the extra 10 minutes required, avoid running as part of PR CI
jobs.
For now just continue using Python 3.11 for our release docs and avoid
running the generation on 3.12. I'm assuming right now that this problem
will go away when we cease building Cartopy ourselves.
These are currently triggering certificate errors on GitHub.
@dopplershift
Copy link
Member Author

@dcamron This is ready for review

@dcamron dcamron merged commit 17d915f into Unidata:main Nov 6, 2023
37 checks passed
@dopplershift dopplershift deleted the support-3.12 branch November 6, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Infrastructure Pertains to project infrastructure (e.g. CI, linting) hacktoberfest-accepted PRs accepted for contributions in hacktoberfest Type: Enhancement Enhancement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants