Verify that we are using the correct Python baseline#18
Merged
Conversation
We are currently asking for 3.10, but we're implicitly depending on newer Python features.
The `type` statement was introduced in Python 3.12 through PEP 695. Python 3.10 introduced TypeAlias, which does the same, albeit with a slightly different syntax.
Use tomli as an optional dependency when installing on systems with Python older than 3.11.
Since we're manipulating the sys.path in order to import the local module, we need to put the import directive into the __main__ block to satisfy the linter.
We want a "lint" group for the CI, and a "dev" group for development purposes.
The setup-python action and poetry allow us to manage the dependencies, as well as the version of Python we want to use in CI. The "lint" group of dependencies includes flake8 and mypy, so we don't need to have separate installation commands for it, and we can leave it to poetry.
ebassi
force-pushed
the
ebassi/python-check
branch
from
June 5, 2026 10:28
07c5229 to
3cae6c2
Compare
tchx84
reviewed
Jun 8, 2026
ebassi
force-pushed
the
ebassi/python-check
branch
from
June 9, 2026 10:03
6b25305 to
11d39a5
Compare
The pyproject.toml file contains the oldest Python version, so the constraint gets satisfied with any newer version. We still want to test on the latest available Python, so we can deal with new features; in order to verify that we're still handling the oldest version of Python, we should add a dedicated CI job.
We're using TypeAlias until we can raise our minimum required version of Python to one that has the type statement.
ebassi
force-pushed
the
ebassi/python-check
branch
from
June 9, 2026 10:04
11d39a5 to
25c1643
Compare
tchx84
approved these changes
Jul 7, 2026
This file contains hidden or 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
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.
Ensure that the CI pipeline is using the build metadata for the Python interpreter and dependencies, so we are accurately testing the build against the right version of everything, instead of winging it.
Closes: #17