-
Notifications
You must be signed in to change notification settings - Fork 97
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
replace pkg_resources for python 3.12 #247
Comments
@branchvincent , thanks for the warning. Before we fix this, we need to solve some prerequisites:
Decide which Python versions Parliament should support nowI propose Parliament now should support versions Python 3.8 through 3.12. Python.org's Devlopers Guide says the oldest supported version is Python 3.8. It will be supported until 2024-10. setup.py was last updated in 2020-08-13. Back then Python 3.6 was still supported, and Python 3.8 was the latest version. So the app still claims support for Python 3.6: Line 47 in 20784b7
And claims compatibility only up to Python 3.8: Lines 51 to 53 in 20784b7
Run tests across all supported Python versionsParliament has a script to run unit tests, and according to the README it's up to the developer to run the script and choose the Python environment. It would be great to run the the tests automatically across all supported Python versions. @branchvincent , we already worked together to solve a similar problem for Sceptre, dropping support for Python 3.7 and adding support for Python 3.12. That lead to a lot of improvements in Sceptre's test infrastructure that I think we can reuse here. I propose we adapt the |
Same issue in Python 3.13. In the meantime, |
Python 3.12 has removed bundled
setuptools
(akapkg_resources
), but it's still used here:parliament/parliament/__init__.py
Lines 17 to 21 in 20784b7
This means 3.12 users need to manually install
setuptools
to have a working install:The recommended replacement is
importlib.resources
(introduced in python 3.7 and published to PyPI asimportlib_resources
for backporting). There's a detailed migration guide: https://importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-filenameThe text was updated successfully, but these errors were encountered: