Skip to content

Commit 86c7871

Browse files
[PY313] Add stubs for soft-deprecated typing members (#2503)
1 parent 0156c04 commit 86c7871

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ What's New in astroid 3.3.2?
1313
============================
1414
Release date: TBA
1515

16+
* Restore support for soft-deprecated members of the ``typing`` module with python 3.13.
17+
18+
Refs pylint-dev/pylint#9852
1619

1720

1821
What's New in astroid 3.3.1?

astroid/brain/brain_typing.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,18 @@ class TypeVar:
451451
@classmethod
452452
def __class_getitem__(cls, item): return cls
453453
class TypeVarTuple: ...
454+
class ContextManager:
455+
@classmethod
456+
def __class_getitem__(cls, item): return cls
457+
class AsyncContextManager:
458+
@classmethod
459+
def __class_getitem__(cls, item): return cls
460+
class Pattern:
461+
@classmethod
462+
def __class_getitem__(cls, item): return cls
463+
class Match:
464+
@classmethod
465+
def __class_getitem__(cls, item): return cls
454466
"""
455467
)
456468
)

0 commit comments

Comments
 (0)