Drop support for --python-version 3.9#21243
Merged
JukkaL merged 7 commits intopython:masterfrom Apr 16, 2026
Merged
Conversation
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
JelleZijlstra
approved these changes
Apr 16, 2026
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: antidote (https://github.com/Finistere/antidote)
- pyproject.toml: [mypy]: python_version: Python 3.7 is not supported (must be 3.9 or higher)
+ pyproject.toml: [mypy]: python_version: Python 3.7 is not supported (must be 3.10 or higher)
- .../projects/_antidote_venv/lib/python3.14/site-packages/_pytest/terminal.py:1729: error: Pattern matching is only supported in Python 3.10 and greater [syntax]
+ src/antidote/core/_wiring.py:15: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/_wiring.py:15: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/_wiring.py:15: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/_wiring.py:15: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/_injection.py:278: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/_injection.py:278: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/_injection.py:278: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/_injection.py:278: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/_inject.py:43: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:43: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/_inject.py:43: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:43: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/_inject.py:93: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:93: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/_inject.py:93: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:93: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/_inject.py:132: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:132: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/_inject.py:141: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:141: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/_inject.py:147: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:147: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/_inject.py:156: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/_inject.py:156: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/_inject.py:348: error: Expected iterable as variadic argument [misc]
+ src/antidote/core/_inject.py:348: error: Argument after ** must be a mapping, not "dict[str, Any] | None" [arg-type]
+ src/antidote/core/__init__.py:192: error: Overloaded function signatures 1 and 3 overlap with incompatible return types [overload-overlap]
+ src/antidote/core/__init__.py:197: error: Overloaded function signatures 2 and 3 overlap with incompatible return types [overload-overlap]
+ src/antidote/core/__init__.py:197: note: Flipping the order of overloads will fix this error
+ src/antidote/core/__init__.py:398: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]
+ src/antidote/core/__init__.py:398: note: Flipping the order of overloads will fix this error
+ src/antidote/core/__init__.py:985: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/__init__.py:985: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/__init__.py:985: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/__init__.py:985: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/__init__.py:1033: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/__init__.py:1033: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/__init__.py:1042: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/core/__init__.py:1042: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/core/__init__.py:1048: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/__init__.py:1048: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/core/__init__.py:1057: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/core/__init__.py:1057: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/lib/lazy_ext/_lazy.py:104: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/_lazy.py:104: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/lazy_ext/_lazy.py:110: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/_lazy.py:110: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:210: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:210: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:216: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:216: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:499: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:499: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:505: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:505: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:635: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/lazy_ext/__init__.py:635: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/_function.py:76: error: Unused "type: ignore" comment [unused-ignore]
+ src/antidote/lib/interface_ext/_interface.py:78: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/_interface.py:78: note: Flipping the order of overloads will fix this error
+ src/antidote/lib/interface_ext/_interface.py:118: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/_interface.py:118: note: Flipping the order of overloads will fix this error
+ src/antidote/lib/interface_ext/_interface.py:257: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/_interface.py:257: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:357: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/__init__.py:357: note: Flipping the order of overloads will fix this error
+ src/antidote/lib/interface_ext/__init__.py:396: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/__init__.py:396: note: Flipping the order of overloads will fix this error
+ src/antidote/lib/interface_ext/__init__.py:576: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:576: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1014: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1017: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1026: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1029: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1035: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1068: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1207: error: Overloaded function signatures 1 and 2 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/__init__.py:1207: note: Flipping the order of overloads will fix this error
+ src/antidote/lib/interface_ext/__init__.py:1237: error: "classmethod" expects 3 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1237: error: Missing type arguments for generic type "classmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1241: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1241: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1263: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1263: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1266: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1266: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1278: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1278: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1281: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1281: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1289: error: Overloaded function signatures 1 and 5 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/__init__.py:1298: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1298: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1299: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1299: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader [overload-cannot-match]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1321: error: Overloaded function signatures 1 and 5 overlap with incompatible return types [overload-overlap]
+ src/antidote/lib/interface_ext/__init__.py:1330: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1330: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1331: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1331: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader [overload-cannot-match]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1359: error: "staticmethod" expects 2 type arguments, but 1 given [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1359: error: Missing type arguments for generic type "staticmethod" [type-arg]
+ src/antidote/lib/interface_ext/__init__.py:1369: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1369: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1372: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1372: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1384: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1384: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/__init__.py:1387: error: Missing return statement [empty-body]
+ src/antidote/lib/interface_ext/__init__.py:1387: note: If the method is meant to be abstract, use @abc.abstractmethod
+ src/antidote/lib/interface_ext/_provider.py:312: error: Argument "weight" to "replace" of "CandidateImplementation[Weight]" has incompatible type "NewWeight"; expected "Weight" [arg-type]
+ docs/conf.py:79: error: Function is missing a type annotation [no-untyped-def]
+ docs/conf.py:177: error: Need type annotation for "latex_elements" (hint: "latex_elements: dict[<type>, <type>] = ...") [var-annotated]
+ docs/conf.py:223: error: Function is missing a type annotation [no-untyped-def]
+ tests/lib/lazy/test_lazy.py:286: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:293: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:301: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:308: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:316: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:324: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:658: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:662: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:668: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:672: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:677: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:682: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:845: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:849: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:855: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:859: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:864: error: Missing return statement [empty-body]
+ tests/lib/lazy/test_lazy.py:869: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:33: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:142: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:161: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:184: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:205: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:253: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:435: error: Missing return statement [empty-body]
+ tests/lib/interface/test_lazy.py:441: error: Missing return statement [empty-body]
... (truncated 94 lines) ...
PyWinCtl (https://github.com/Kalmat/PyWinCtl)
- setup.cfg: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)
+ setup.cfg: [mypy]: python_version: Python 3.8 is not supported (must be 3.10 or higher)
pywin32 (https://github.com/mhammond/pywin32)
+ mypy.ini: [mypy]: python_version: Python 3.9 is not supported (must be 3.10 or higher)
pybind11 (https://github.com/pybind/pybind11)
- pyproject.toml: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)
+ pyproject.toml: [mypy]: python_version: Python 3.8 is not supported (must be 3.10 or higher)
build (https://github.com/pypa/build)
+ pyproject.toml: [mypy]: python_version: Python 3.9 is not supported (must be 3.10 or higher)
manticore (https://github.com/trailofbits/manticore)
- mypy.ini: [mypy]: python_version: Python 3.7 is not supported (must be 3.9 or higher)
+ mypy.ini: [mypy]: python_version: Python 3.7 is not supported (must be 3.10 or higher)
PyGithub (https://github.com/PyGithub/PyGithub)
+ pyproject.toml: [mypy]: python_version: Python 3.9 is not supported (must be 3.10 or higher)
mkosi (https://github.com/systemd/mkosi)
+ pyproject.toml: [mypy]: python_version: Python 3.9 is not supported (must be 3.10 or higher). You may need to put quotes around your Python version
com2ann (https://github.com/ilevkivskyi/com2ann)
+ usage: mypy [-h] [-v] [-V] [more options; see below]
+ [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
+ mypy: error: argument --python-version: Python 3.9 is not supported (must be 3.10 or higher)
packaging (https://github.com/pypa/packaging)
- pyproject.toml: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)
+ pyproject.toml: [mypy]: python_version: Python 3.8 is not supported (must be 3.10 or higher)
git-revise (https://github.com/mystor/git-revise)
- mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)
+ mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.10 or higher)
scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- .../projects/_scikit-build-core_venv/lib/python3.14/site-packages/_pytest/terminal.py:1729: error: Pattern matching is only supported in Python 3.10 and greater [syntax]
+ pyproject.toml: [mypy]: python_version: Python 3.9 is not supported (must be 3.10 or higher)
+ tests/test_pyproject_pep517.py:374: error: "PackageMetadata" has no attribute "get" [attr-defined]
dragonchain (https://github.com/dragonchain/dragonchain)
- mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.9 or higher)
+ mypy.ini: [mypy]: python_version: Python 3.8 is not supported (must be 3.10 or higher)
nox (https://github.com/wntrblm/nox)
+ pyproject.toml: [mypy]: python_version: Python 3.9 is not supported (must be 3.10 or higher)
+ nox/_option_set.py:50: error: Only concrete class can be given where "type[PathLike[Any]]" is expected [type-abstract]
|
Collaborator
|
Are the new errors in |
Member
|
It seems we previously had a blocking error (because some dependency used pattern matching which is new in 3.10). Now that we only support 3.10+ mypy actually typechecks the package. |
Collaborator
|
Ok, all is fine then! |
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.
Resolves #20154
It's getting close to time. Typeshed will drop support in a few days.
Co-authored-by Codex