diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cf71773..6d0b024e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# Unreleased + +- Fix tests on Python 3.13.0a6. 3.13.0a6 adds a new + `__static_attributes__` attribute to all classes in Python, + which broke some assumptions made by the implementation of + `typing_extenions.Protocol`. + # Release 4.11.0 (April 5, 2024) This feature release provides improvements to various recently diff --git a/src/typing_extensions.py b/src/typing_extensions.py index 9ccd519c..3d441bc2 100644 --- a/src/typing_extensions.py +++ b/src/typing_extensions.py @@ -442,6 +442,9 @@ def clear_overloads(): if sys.version_info >= (3, 12): _EXCLUDED_ATTRS.add("__type_params__") +if sys.version_info >= (3, 13): + _EXCLUDED_ATTRS.add("__static_attributes__") + _EXCLUDED_ATTRS = frozenset(_EXCLUDED_ATTRS)