File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ dependencies = [
50
50
# cffi is required on Windows, except on PyPy where it is built-in
51
51
" cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy'" ,
52
52
" exceptiongroup; python_version < '3.11'" ,
53
+ # using typing_extensions.depreciated in _sync.py
54
+ " typing_extensions >= 4.15.0" ,
53
55
]
54
56
dynamic = [" version" ]
55
57
Original file line number Diff line number Diff line change 4
4
from typing import TYPE_CHECKING , Literal , Protocol
5
5
6
6
import attrs
7
+ from typing_extensions import deprecated
7
8
8
9
import trio
9
10
@@ -113,17 +114,16 @@ def statistics(self) -> EventStatistics:
113
114
"""
114
115
return EventStatistics (tasks_waiting = len (self ._tasks ))
115
116
116
- if not TYPE_CHECKING :
117
-
118
- def __bool__ (self ) -> Literal [True ]:
119
- """Return True and raise warning."""
120
- warn_deprecated (
121
- self .__bool__ ,
122
- "0.31.0" ,
123
- issue = 3238 ,
124
- instead = self .is_set ,
125
- )
126
- return True
117
+ @deprecated
118
+ def __bool__ (self ) -> Literal [True ]:
119
+ """Return True and raise warning."""
120
+ warn_deprecated (
121
+ self .__bool__ ,
122
+ "0.31.0" ,
123
+ issue = 3238 ,
124
+ instead = self .is_set ,
125
+ )
126
+ return True
127
127
128
128
129
129
class _HasAcquireRelease (Protocol ):
You can’t perform that action at this time.
0 commit comments