You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
typing.ByteString and collections.abc.ByteString have both been removed from their respective __all__s. It probably makes sense to drop the typing.ByteString -> collections.abc.ByteString recommendation from UP035 as well (but keep the collections.ByteString -> collections.abc.ByteString version, which is still helpful on older versions)
TypeVarTuple now accepts bound, but UP040, UP046, and UP047 generate invalid syntax such as [*Ts: int]. These conversions should be skipped while the bound's typing semantics remain unspecified.
RUF064 should check the new parent_mode argument to os.makedirs and Path.mkdir. PTH103 should preserve it when converting os.makedirs calls to Path.mkdir.
UP013 should preserve the new TypedDictclosed and extra_items arguments when converting to class syntax. Quoted types in class-based extra_items arguments should also count as uses of their imports, avoiding false F401 diagnostics.
This is a tracking issue for Python 3.15 support.
PEP 810: Lazy imports
UP026needslazyimport support in libCST for fixes to workTC001-TC003should not apply with lazy imports #25181flake8-type-checking] Prefer lazy imports overTYPE_CHECKINGon 3.15+ (TC001,TC002,TC003) #28541Support
__lazy_modules__in lazy import rules #25170__lazy_modules__#28459[Infinite loop] TID254 when an import statement has conflicting laziness requirements #26450
flake8-tidy-imports] Skip fixes for multi-member imports (TID254) #26584Conflict (infinite loop) between
lazy-import-mismatch (TID254)andlazy-import-immediately-resolved (TID255)withlint.flake8-tidy-imports.require-lazy="all"` #25418flake8-tidy-imports] Prevent fix loop betweenTID254andTID255#28262PEP 798: Unpacking in comprehensions
C411,C418, andC419diagnose the new unpacking comprehensions but cannot autofix them because the LibCST-based fixers do not support the syntax yetUnicode 17
Parser
Standard library updates
Other rule changes
RUF039andRUF055should know aboutre.prefixmatchruff] Recognizere.prefixmatch(RUF039,RUF055) #28311ImportCycleErroris incorrectly classified as a 3.13 builtin in PLW0133pylint] GateImportCycleErroron Python 3.15 (PLW0133) #28310sliceandfrozendictas generic types so their quoted type arguments are analyzed correctly.sliceandfrozendictgenerics #28477slicetyping.no_type_check_decorator()has been removed and should no longer be recommended byUP035pyupgrade] Stop recommending removedtyping.no_type_check_decorator(UP035) #28475__cached__is no longer initialized in Python 3.15 and should only be included in Ruff's magic globals for earlier target versions.__cached__for Python 3.15 #28476typing.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)pyupgrade] Stop recommending deprecatedByteStringaliases (UP035) #28498TypeForm[...]andTypeForm(...), avoiding falseF401diagnostics.typing.TypeForm#28507TypeVarTuplenow acceptsbound, butUP040,UP046, andUP047generate invalid syntax such as[*Ts: int]. These conversions should be skipped while the bound's typing semantics remain unspecified.pyupgrade] SkipTypeVarTupleandParamSpecconversions with bounds or constraints (UP040,UP046,UP047) #28505RUF064should check the newparent_modeargument toos.makedirsandPath.mkdir.PTH103should preserve it when convertingos.makedirscalls toPath.mkdir.ruff,flake8-use-pathlib] Supportparent_mode(RUF064,PTH103) #28528os.makedirsandPath.mkdiros.makedirsfix validationUP013should 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.TypedDictclass keywords #28533Rule stabilizations
Misc
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.Prefer
prefixmatchovermatch#24545Suggested optimizing refactors around
bytearray.take_bytes