Skip to content

Commit b1b5314

Browse files
committed
Remove typing_extensions requirement
1 parent c3a0a76 commit b1b5314

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ dependencies = [
5050
# cffi is required on Windows, except on PyPy where it is built-in
5151
"cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy'",
5252
"exceptiongroup; python_version < '3.11'",
53-
# using typing_extensions.depreciated in _sync.py
54-
"typing_extensions >= 4.15.0",
5553
]
5654
dynamic = ["version"]
5755

src/trio/_sync.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from __future__ import annotations
22

33
import math
4-
from typing import TYPE_CHECKING, Literal, Protocol
4+
from typing import TYPE_CHECKING, Literal, Protocol, TypeVar
55

66
import attrs
7-
from typing_extensions import deprecated
87

98
import trio
109

@@ -23,8 +22,15 @@
2322
if TYPE_CHECKING:
2423
from types import TracebackType
2524

25+
from typing_extensions import deprecated
26+
2627
from ._core import Task
2728
from ._core._parking_lot import ParkingLotStatistics
29+
else:
30+
T = TypeVar("T")
31+
32+
def deprecated(f: T) -> T:
33+
return f
2834

2935

3036
@attrs.frozen

test-requirements.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ outcome
3939
sniffio
4040
# 1.2.1 fixes types
4141
exceptiongroup >= 1.2.1; python_version < "3.11"
42-
typing_extensions >= 4.15.0

0 commit comments

Comments
 (0)