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

Follow-up after removing support for Python v3.8 #475

Merged
merged 17 commits into from
Mar 11, 2025

Conversation

jherland
Copy link
Member

Various cleanups and modernizations made possible by #474.

jherland added 13 commits March 4, 2025 00:33
Some ignores are mentioned in both the general section and the tests/*
section. Remove the latter.
`from __future__ import annotations` became available in Python 3.7, so
there is no reason for us not to use it instead of the older
"stringified" type annotations (for types that are not yet declared at
the time the parser encounters the annotation).
This updates our type annotations to benefit from PEP585 being available
in Python >v3.9: In essence this means we can change from from this:

    from typing import List

    foo: List[str] = ["hello", "world"]

to this:

    foo: list[str] = ["hello", "world"]

as well as Iterable, Iterator, Callable, etc. moving from the typing
module into collections.abc.
@jherland jherland force-pushed the jherland/drop-python-38-followup branch from 05e8b43 to 9575087 Compare March 3, 2025 23:33
jherland added 3 commits March 4, 2025 01:03
Now that we no longer support EOL Python versions, we can finally stop
pulling Python version from multiple versions of nixpkgs. Instead, we
choose a current version of nixos-unstable, and get all current Python
versions from there. In addition this gives us a new version of Poetry,
v2, which brings some associated changes.

For one, Poetry since v2 no longer ships the `export` command, so its
use in our noxfile.py necessitates adding the poetry-plugin-export
dependency whenever nox is installed.
This reverts commit d3f4210.

Since we're no longer supporting EOL Python versions, we can now use the
latest Poetry version. This brings in some additional changes:

 - 'poetry install --sync' is  now 'poetry sync'
 - 'poetry run ...' requires an extra '--' to separate poetry args from
   subcommand args.
@jherland jherland force-pushed the jherland/drop-python-38-followup branch from 9575087 to f44e42e Compare March 4, 2025 00:06
@jherland jherland marked this pull request as ready for review March 4, 2025 00:15
Copy link
Contributor

@obscurerichard obscurerichard left a comment

Choose a reason for hiding this comment

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

👍🏻 :shipit:

This all looks pretty normal to me for the types of changes that would be good to have in the wake of a version upgrade... and the tests are passing.

@jherland jherland merged commit a7ba427 into main Mar 11, 2025
57 checks passed
@jherland jherland deleted the jherland/drop-python-38-followup branch March 11, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants