Closed
Description
The flake
test session runs:
- the ruff linter
- the ruff formatter
- mypy
- check-sdist
Lines 205 to 215 in f5fe820
This test session is run twice during CI, with two different versions of Python:
cryptography/.github/workflows/ci.yml
Lines 26 to 27 in f5fe820
I don't see the need for that:
- ruff is a Rust program that does not depend on the available version of Python. Instead, the target Python version is defined in:
Line 48 in f5fe820
- While mypy does target the version of Python that is running mypy by default, the version of Python does not seem relevant:
- Option
--python-version
could be used to modify the target version of Python. - Most importantly, cryptography lacks checks based on sys.version_info, except for a couple checks detailed in bump mypy #12989 (comment) that are irrelevant for typing. Such checks define different code paths when targeting different versions of Python according to section Python version and system platform checks of the documentation.
- Even if there were more code paths specific to Python 3.8, testing typing with previous versions of Python doesn't seem useful. Such “legacy” code paths usually do not change much until they disappear and should have been tested at some point in the past with previous versions of Python.
- Option
- I understand the version of Python used to run check-sdist is irrelevant too.
I suggest running the flake
test session with Python 3.13 only. If you insist on running mypy with different target versions of Python, I suggest splitting it into ruff
, mypy
and check-sdist
sessions.
Metadata
Metadata
Assignees
Labels
No labels