diff --git a/ChangeLog b/ChangeLog index c67ec5dd18..1196f75cee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,9 @@ What's New in astroid 3.3.2? ============================ Release date: TBA +* Restore support for soft-deprecated members of the ``typing`` module with python 3.13. + + Refs pylint-dev/pylint#9852 What's New in astroid 3.3.1? diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index 8eadb9d602..38b01778b1 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -451,6 +451,18 @@ class TypeVar: @classmethod def __class_getitem__(cls, item): return cls class TypeVarTuple: ... + class ContextManager: + @classmethod + def __class_getitem__(cls, item): return cls + class AsyncContextManager: + @classmethod + def __class_getitem__(cls, item): return cls + class Pattern: + @classmethod + def __class_getitem__(cls, item): return cls + class Match: + @classmethod + def __class_getitem__(cls, item): return cls """ ) )