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 v3.12 #383

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Support Python v3.12 #383

merged 5 commits into from
Oct 11, 2023

Conversation

jherland
Copy link
Member

A fairly straighforward upgrade of our deps to support Python v3.12. No material changes to our code.

Commits:

  • shell.nix: Upgrade nixpkgs to version that has Python v3.12.0
  • poetry.lock: Refresh with Poetry v1.6.1
  • test_local_env: Relax test on default venv to accomodate Python v3.12
  • Upgrade Pylint for Python versions >=v3.8
  • Add Python v3.12 support

@jherland jherland self-assigned this Oct 11, 2023
@jherland jherland linked an issue Oct 11, 2023 that may be closed by this pull request
Copy link
Collaborator

@Nour-Mws Nour-Mws left a comment

Choose a reason for hiding this comment

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

A joy to review as usual :)

Generated with `poetry lock --no-update` after re-entering the latest
nix-shell which upgrades Poetry from v1.4.2.
From https://docs.python.org/3.12/library/venv.html: "Changed in
version 3.12: setuptools is no longer a core venv dependency."

To pass our test suite on Python v3.12, we must relax our test on what a
default virtual environment (e.g. as installed by `python -m venv ...`)
should contain. setuptools is no longer installed by Python v3.12, and
AFAICS, the only common subset of packages/import names installed by the
venv module across all our supported Python versions is "pip"/"pip".
Our current Pylint version crashes when run with Python v3.12, and we
need to upgrade to Pylint v3 in order to fix this. However, Pylint v3
removes support for Python v3.7. Hence, Upgrade Pylint to v3 for Python
>=v3.8, and remain on the old Pylint version for Python v3.7.

In addition to the pyproject.toml/poetry.lock upgrade itself, there are
a few new warnings that need silencing in order for our code to pass
with the new Pylint version.
@jherland jherland force-pushed the jherland/python-3.12 branch from c40da9d to df2e301 Compare October 11, 2023 14:17
@jherland jherland merged commit dad8ba4 into main Oct 11, 2023
@jherland jherland deleted the jherland/python-3.12 branch October 11, 2023 14:39
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.

Support Python v3.12
2 participants