-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Add Python 3.12 to the CI matrix #2148
base: main
Are you sure you want to change the base?
Conversation
3.12 is failing on the CI: https://github.com/jazzband/pip-tools/actions/runs/12346208386/job/34451449901?pr=2148 |
Failure for piplowest is due to it referencing I think that we'll need to bump the minimal support version of pip. |
I think that failure with pipsupported might be due to to this change in pip:
|
References to pkgutil.ImpImporter were made conditional in pypa/pip@f1a7a6f, which was first included in 23.1.2, tagged 2023-04-26. I wonder if we need to update the minimal supported |
See also: #2104 |
pip itself only supports the most recent version. is there a reason to be careful to maximize backward compatibility? |
I think historically, pip-tools would support the previous pip version and the current one. But now with so low activity we're not catching up with the changes on time. The README even used to have a compatibility table. I didn't really want this PR to become a discussion of the support drops. Only wanted to add modern Python to the matrix. Obviously, it needs some tweaks, likely incorporating the ideas from #2105. |
that's fine. we can discuss it elsewhere as well. really i meant to voice my support for dropping support for older versions over adding complexity to the pipeline |
I think that for as long as a good range of Pythons is supported, it's okay to depend on newer Pip versions. But I don't have stats on why people would want to use older versions of it, honestly. This would require somebody to lead a discussion and make sure different user groups are reached, aware and heard. |
Post tox invocation, this is reproducible via $ .tox/py312-piplowest/bin/python -I -m pip install
ERROR: Exception:
Traceback (most recent call last):
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 315, in run
session = self.get_default_session(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 98, in get_default_session
self._session = self.enter_context(self._build_session(options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
session = PipSession(
^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/network/session.py", line 343, in __init__
self.headers["User-Agent"] = user_agent()
^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/network/session.py", line 175, in user_agent
setuptools_dist = get_default_environment().get_distribution("setuptools")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 180, in get_distribution
return next(matches, None)
^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 177, in <genexpr>
for distribution in self.iter_all_distributions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/base.py", line 594, in iter_all_distributions
for dist in self._iter_distributions():
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 168, in _iter_distributions
for dist in finder.find_eggs(location):
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 136, in find_eggs
yield from self._find_eggs_in_dir(location)
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 103, in _find_eggs_in_dir
from pip._vendor.pkg_resources import find_distributions
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2164, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/__main__.py", line 31, in <module>
sys.exit(_main())
^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/main.py", line 70, in main
return command.main(cmd_args)
^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 101, in main
return self._main(args)
^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
self.handle_pip_version_check(options)
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 179, in handle_pip_version_check
session = self._build_session(
^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
session = PipSession(
^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/network/session.py", line 343, in __init__
self.headers["User-Agent"] = user_agent()
^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/network/session.py", line 175, in user_agent
setuptools_dist = get_default_environment().get_distribution("setuptools")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 180, in get_distribution
return next(matches, None)
^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 177, in <genexpr>
for distribution in self.iter_all_distributions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/base.py", line 594, in iter_all_distributions
for dist in self._iter_distributions():
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 168, in _iter_distributions
for dist in finder.find_eggs(location):
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 136, in find_eggs
yield from self._find_eggs_in_dir(location)
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 103, in _find_eggs_in_dir
from pip._vendor.pkg_resources import find_distributions
File "~/src/github/jazzband/pip-tools/.tox/py312-piplowest/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2164, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? |
737a65c
to
adc094a
Compare
@WhyNotHugo I applied the suggested update. |
adc094a
to
088299b
Compare
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.
LGTM. Just one questions for my own curiosity.
@@ -38,7 +38,8 @@ dependencies = [ | |||
# direct dependencies | |||
"build >= 1.0.0", | |||
"click >= 8", | |||
"pip >= 22.2", | |||
"pip >= 23.1; python_version >= '3.12'", | |||
"pip >= 22.2; python_version < '3.12'", |
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.
Is the conditional required here? Without it, would the rule supersede the previous, or both apply?
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 that not all pip versions would merge these properly otherwise. But I haven't checked in a while. FWIW, this is the typical idiom people tend to follow.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.