diff --git a/src/typing_extensions.py b/src/typing_extensions.py index efa09d55..c88d2a2f 100644 --- a/src/typing_extensions.py +++ b/src/typing_extensions.py @@ -2274,7 +2274,7 @@ def query(sql: LiteralString) -> ...: raise TypeError(f"{self} is not subscriptable") -if hasattr(typing, "Self"): # 3.11+ +if sys.version_info >= (3, 11): Self = typing.Self else: @_SpecialForm