-
Notifications
You must be signed in to change notification settings - Fork 43
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
Unpin setuptools for Python>=3.12 #224
Conversation
The version of setuptools pinned by the wheelhouse is incompatible with python 3.12, to avoid breaking old charms, this patch unpins setuptools only for python>=3.12 Fixes the following error at build time: File "/tmp/pip-download-gg1zdrmr/setuptools_ebd74bdeeaf0421480a69f5448330f5e/setuptools/__init__.py", line 16, in <module> import setuptools.version File "/tmp/pip-download-gg1zdrmr/setuptools_ebd74bdeeaf0421480a69f5448330f5e/setuptools/version.py", line 1, in <module> import pkg_resources File "/tmp/pip-download-gg1zdrmr/setuptools_ebd74bdeeaf0421480a69f5448330f5e/pkg_resources/__init__.py", line 2191, in <module> register_finder(pkgutil.ImpImporter, find_on_path) ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the correct approach; I noticed a few other lines (not included in the change) which look odd that I've commented on.
wheelhouse.txt
Outdated
@@ -26,7 +26,8 @@ MarkupSafe<2.2.0;python_version >= '3.7' # newer pythons | |||
|
|||
setuptools<42;python_version < '3.8' | |||
# https://github.com/juju-solutions/layer-basic/issues/201 | |||
setuptools<62.2.0;python_version >= '3.8' | |||
setuptools<62.2.0;python_version >= '3.8' and python_version<'3.12' | |||
setuptools>=62.2.0;python_version >= '3.12' | |||
setuptools-scm<=1.17.0;python_version < '3.8' | |||
# https://github.com/pypa/setuptools_scm/issues/722 | |||
setuptools-scm<7;python_version >= '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line may cause a problem; setupstools-scm is pinned for ever on later versions and not earlier ones; is this a typo from a previous commit?
wheelhouse.txt
Outdated
@@ -41,4 +42,4 @@ netaddr<=0.7.19 | |||
|
|||
# https://github.com/python-trio/sniffio/pull/49 | |||
anyio<3.7.0;python_version >= '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines also look a bit suspect.
Drop anyio and sniffio for python>=3.12, this allows them to be pulled in indirectly by whoever needs them instead of carrying them as part of layer basic
When TEST_JUJU3 is set, zaza will allow the use of python-libjuju>=3.0
The version of setuptools pinned by the wheelhouse is incompatible with python 3.12, to avoid breaking old charms, this patch unpins setuptools only for python>=3.12
Fixes the following error at build time: