Skip to content

Commit 0da0068

Browse files
committed
Fix crash due to runtime import of typing_extensions
typing_extensions doesn't presently need to be a runtime dependency.
1 parent ec32bb8 commit 0da0068

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

trio/_unix_pipes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
import os
44
import errno
5-
from typing_extensions import Final as FinalType
5+
from typing import TYPE_CHECKING
66

77
from ._abc import Stream
88
from ._util import ConflictDetector, Final
99

1010
import trio
1111

12+
if TYPE_CHECKING:
13+
from typing_extensions import Final as FinalType
14+
1215
if os.name != "posix":
1316
# We raise an error here rather than gating the import in lowlevel.py
1417
# in order to keep jedi static analysis happy.

0 commit comments

Comments
 (0)