Skip to content

Commit 02ae69b

Browse files
committed
Merge branch 'main' of https://github.com/PyCQA/astroid into pylint_issue_5719
2 parents a48aa4d + 8581d9d commit 02ae69b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Release date: TBA
2121

2222
Refs PyCQA/pylint#5719
2323

24+
* Remove unnecessary typing_extensions dependency on Python 3.11 and newer
25+
2426
What's New in astroid 2.13.2?
2527
=============================
2628
Release date: 2023-01-08

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636
"wrapt>=1.14,<2;python_version>='3.11'",
3737
"wrapt>=1.11,<2;python_version<'3.11'",
3838
"typed-ast>=1.4.0,<2.0;implementation_name=='cpython' and python_version<'3.8'",
39-
"typing-extensions>=4.0.0",
39+
"typing-extensions>=4.0.0;python_version<'3.11'",
4040
]
4141
dynamic = ["version"]
4242

tests/unittest_scoped_nodes.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,11 +1907,14 @@ def test_mro_typing_extensions(self):
19071907
import typing
19081908
import dataclasses
19091909
1910-
import typing_extensions
1910+
if sys.version_info >= (3, 8):
1911+
from typing import Protocol
1912+
else:
1913+
from typing_extensions import Protocol
19111914
19121915
T = typing.TypeVar("T")
19131916
1914-
class MyProtocol(typing_extensions.Protocol): pass
1917+
class MyProtocol(Protocol): pass
19151918
class EarlyBase(typing.Generic[T], MyProtocol): pass
19161919
class Base(EarlyBase[T], abc.ABC): pass
19171920
class Final(Base[object]): pass

0 commit comments

Comments
 (0)