-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
ci: Remove Python 3.8; add Python 3.12. #842
Conversation
Use `importlib-metadata` for newer Python versions as well. Fixes zulip#829.
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.
Self-reviewed.
name: Debian 12 (Python 3.11, backend + documentation) | ||
os: bookworm | ||
legacy_client_interface: "7" | ||
server_version: refs/tags/7.0 |
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.
Earliest major Zulip version that has the same entry in its matrix.
name: Ubuntu 24.04 (Python 3.12, backend) | ||
os: noble | ||
legacy_client_interface: "8" | ||
server_version: refs/tags/8.5 |
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.
Earliest minor Zulip version that supports the platform is 8.3.
But, 8.3 and 8.4 are unable to use pip
inside the venv, due to version conflicts related to pkg_resources
. Only versions 8.5 onwards seem to be working.
Traceback
Traceback (most recent call last):
File "/srv/zulip-py3-venv/bin/pip", line 5, in <module>
from pip._internal.cli.main import main
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module>
from pip._internal.cli.progress_bars import BAR_TYPES
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
from pip._internal.utils.logging import get_indentation
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
from pip._internal.utils.misc import ensure_dir
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_internal/utils/misc.py", line 21, in <module>
from pip._vendor import pkg_resources
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3254, in <module>
@_call_aside
^^^^^^^^^^^
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3238, in _call_aside
f(*args, **kwargs)
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3280, in _initialize_master_working_set
tuple(
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3281, in <genexpr>
dist.activate(replace=False)
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2788, in activate
declare_namespace(pkg)
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2285, in declare_namespace
_handle_ns(packageName, path_item)
File "/srv/zulip-venv-cache/e2c2c053635e882ff393067adf908813bcad92ef/zulip-py3-venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2202, in _handle_ns
loader = importer.find_module(packageName)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FileFinder' object has no attribute 'find_module'
os: bookworm | ||
legacy_client_interface: "7" | ||
server_version: refs/tags/7.0 | ||
# Ubuntu 24.04 ships with Python 3.12.3. |
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.
Though, the Zulip workflow mentions 3.12.2, the actual version used now seems to be 3.12.3.
@@ -56,7 +56,7 @@ | |||
"lxml", | |||
"BeautifulSoup4", | |||
"typing_extensions>=4.5.0", | |||
'importlib-metadata >= 3.6; python_version < "3.10"', | |||
"importlib-metadata>=3.6", |
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.
Fix for #829, included in this commit as it is necessary for the Py 3.12 tests (but not for the 3.11 one).
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.
Hmm, isn't the point of #829 that we can just drop this dependency and use the built-in module in 3.10? Or do we need to wait until we drop 3.9 support to drop it?
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.
Yes, we can't drop it before dropping 3.9 support.
We could conditionally use the built-in module for >=3.10 without waiting until the dependency is dropped though.
Seems OK, merged, thanks @Niloth-p! |
Fixes: Failing CI for Py 3.8
Fixes: #829
Fixes: #841 can be closed as well.
Removes Python 3.8.
Adds Py 3.11 Zulip 7.0 to matrix strategy.
Adds Python 3.12.
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: