From b00b86c37e438b5d40b81956e86fb55fbd242d9b Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sat, 10 Aug 2024 17:06:09 -0400 Subject: [PATCH 1/2] [PY313] Add stubs for soft-deprecated typing members (#2503) (cherry picked from commit 86c7871563a52e47466837d4a8c7a7a91e43bf46) --- ChangeLog | 3 +++ astroid/brain/brain_typing.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) 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 """ ) ) From 4ae46172a26bc9fd2a9668c69e4327c31cd48240 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sun, 11 Aug 2024 07:47:19 -0400 Subject: [PATCH 2/2] Bump astroid to 3.3.2, update changelog --- ChangeLog | 8 +++++++- astroid/__pkginfo__.py | 2 +- tbump.toml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1196f75cee..d4b2ca2450 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,10 +9,16 @@ Release date: TBA -What's New in astroid 3.3.2? +What's New in astroid 3.3.3? ============================ Release date: TBA + + +What's New in astroid 3.3.2? +============================ +Release date: 2024-08-11 + * Restore support for soft-deprecated members of the ``typing`` module with python 3.13. Refs pylint-dev/pylint#9852 diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py index f3dc052c63..99c1a03511 100644 --- a/astroid/__pkginfo__.py +++ b/astroid/__pkginfo__.py @@ -2,5 +2,5 @@ # For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE # Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt -__version__ = "3.3.1" +__version__ = "3.3.2" version = __version__ diff --git a/tbump.toml b/tbump.toml index ce5d1f3ddd..83d0b32940 100644 --- a/tbump.toml +++ b/tbump.toml @@ -1,7 +1,7 @@ github_url = "https://github.com/pylint-dev/astroid" [version] -current = "3.3.1" +current = "3.3.2" regex = ''' ^(?P0|[1-9]\d*) \.