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 #78

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Support Python 3.12 #78

merged 1 commit into from
Mar 13, 2024

Conversation

mrtmm
Copy link

@mrtmm mrtmm commented Mar 13, 2024

  • Replace the use of pkg_resources (from setuptools, which is no longer included in virtual environments as of 3.12) with importlib.metadata and importlib_resources.

  • Add Python 3.12 to the test matrix.

@mrtmm mrtmm force-pushed the python-3.12 branch 2 times, most recently from bb926ba to 9d4d9a2 Compare March 13, 2024 10:07
@@ -2,7 +2,7 @@
from .__about__ import __version__
from glob import glob
import os
import pkg_resources
import importlib_resources
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't add any dependency on importlib_resources in this change, and we don't need to, because we do depend on tutor, which as of overhangio/tutor@d99b2fe does have that dependency.

As explained in overhangio/tutor#966 (comment), Tutor will drop that dependency once it no longer wants to support Python 3.8. At that point, this import statement will also break, and we will replace it with

from importlib import resources as importlib_resources

Perhaps we want to add a comment to that effect now, as a benefit to our future selves?

Copy link
Author

Choose a reason for hiding this comment

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

I see, yes, sounds like a good idea, thanks!

* Replace the use of pkg_resources (from setuptools, which is
  no longer included in virtual environments as of 3.12) with
  importlib.metadata and importlib_resources.

* Add Python 3.12 to the test matrix.
@mrtmm mrtmm marked this pull request as ready for review March 13, 2024 11:47
Copy link
Contributor

@fghaas fghaas left a comment

Choose a reason for hiding this comment

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

Looks good to me now, thanks!

@mrtmm mrtmm merged commit 3648475 into hastexo:main Mar 13, 2024
5 checks passed
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.

2 participants