Repository navigation
Description
This is a tracking issue for Python 3.15 support.
PEP 810: Lazy imports
-
UP026needslazyimport support in libCST for fixes to work -
[Infinite loop] TID254 when an import statement has conflicting laziness requirements #26450
PEP 798: Unpacking in comprehensions
- Add full PEP 798 support #25104
-
C411,C418, andC419diagnose the new unpacking comprehensions but cannot autofix them because the LibCST-based fixers do not support the syntax yet
Unicode 17
- Update Rust crate unicode-normalization to v0.1.25 #21229
- Update Rust crate unicode_names2 to v3 #26077
Parser
- Unary plus is now accepted in match literal patterns, mirroring the existing support for unary minus. Our existing parse error should become a version-related syntax error.
Standard library updates
Other rule changes
-
RUF039andRUF055should know aboutre.prefixmatch -
ImportCycleErroris incorrectly classified as a 3.13 builtin in PLW0133 - Ruff should recognize
sliceandfrozendictas generic types so their quoted type arguments are analyzed correctly. - Deprecated
typing.no_type_check_decorator()has been removed and should no longer be recommended byUP035 -
__cached__is no longer initialized in Python 3.15 and should only be included in Ruff's magic globals for earlier target versions. -
typing.ByteStringandcollections.abc.ByteStringhave both been removed from their respective__all__s. It probably makes sense to drop thetyping.ByteString->collections.abc.ByteStringrecommendation fromUP035as well (but keep thecollections.ByteString->collections.abc.ByteStringversion, which is still helpful on older versions) - Ruff should recognize quoted types in
TypeForm[...]andTypeForm(...), avoiding falseF401diagnostics. -
TypeVarTuplenow acceptsbound, butUP040,UP046, andUP047generate invalid syntax such as[*Ts: int]. These conversions should be skipped while the bound's typing semantics remain unspecified. -
RUF064should check the newparent_modeargument toos.makedirsandPath.mkdir.PTH103should preserve it when convertingos.makedirscalls toPath.mkdir.- [
ruff,flake8-use-pathlib] Supportparent_mode(RUF064,PTH103) #28528 - Python documentation:
os.makedirsandPath.mkdir - Current code: permission argument detection and
os.makedirsfix validation
- [
-
UP013should preserve the newTypedDictclosedandextra_itemsarguments when converting to class syntax. Quoted types in class-basedextra_itemsarguments should also count as uses of their imports, avoiding falseF401diagnostics.
Rule stabilizations
- lazy-import-mismatch (TID254)
- lazy-import-immediately-resolved (TID255)
- os-path-commonprefix (RUF071)
Misc
- Rebuild for python 3.15 conda-forge/ruff-feedstock#363
This should be resolved by modernize recipe, add linux-riscv64, win-arm64, shell completions conda-forge/ruff-feedstock#361, when that lands. - Bump the language classifier in pyproject.toml
- Update default and latest Python versions
- Update default and latest Python versions for 3.15 #28792
- 3.10 is reaching EOL
- See Update default and latest Python versions for 3.14 #20725 for last year's bump
Potential lint rules
These shouldn't block the release, but could be interesting.
-
Support and lints for
lazyimports in Python 3.15+ #21305This primarily tracks additional lints now, with the remaining adjustment to existing rules (point 2) tracked by
TC001-TC003should not apply with lazy imports #25181. -
rewrite
... = object()to sentinel in --py315-plus asottile/pyupgrade#1076 -
remove open(..., encoding="utf-8") for
--py315-plusasottile/pyupgrade#1077
Sub-issues
Collapse Sub-issuesSub-issues
Loading 6 sub-issues
Activity
lazyimports in Python 3.15+ #21305lazy-import-mismatch (TID254)andlazy-import-immediately-resolved (TID255)withlint.flake8-tidy-imports.require-lazy="all"` #25418TC001-TC003should not apply with lazy imports #25181__lazy_modules__in lazy import rules #25170prefixmatchovermatch#24545Allow unary plus in match patterns on Python 3.15 (#28231)
[`ruff`] Recognize `re.prefixmatch` (`RUF039`, `RUF055`) (#28311)
[`pylint`] Gate `ImportCycleError` on Python 3.15 (`PLW0133`) (#28310)
GideonBear commentedon Oct 13, 2026
I opened #29326 (partially) for asottile/pyupgrade#1077