generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
05e8b43
to
9575087
Compare
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.
9575087
to
f44e42e
Compare
obscurerichard
approved these changes
Mar 11, 2025
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 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Various cleanups and modernizations made possible by #474.