@@ -34,9 +34,8 @@ if sys.version_info >= (3, 10):
34
34
def getprofile () -> Optional [ProfileFunction ]: ...
35
35
__all__ += ["getprofile" , "gettrace" ]
36
36
37
- if sys .version_info >= (3 , 8 ):
38
- from _thread import get_native_id as get_native_id
39
- __all__ += ["ExceptHookArgs" , "excepthook" , "get_native_id" ]
37
+ from _thread import get_native_id as get_native_id
38
+ __all__ += ["ExceptHookArgs" , "excepthook" , "get_native_id" ]
40
39
41
40
ProfileFunction = Callable [..., Any ]
42
41
TraceFunction = Callable [..., Any ]
@@ -149,10 +148,7 @@ class Semaphore:
149
148
def __enter__ (
150
149
self , blocking : bool = ..., timeout : Optional [float ] = ...
151
150
) -> bool : ...
152
- if sys .version_info >= (3 , 9 ):
153
- def release (self , n : int = ...) -> None : ...
154
- else :
155
- def release (self ) -> None : ...
151
+ def release (self , n : int = ...) -> None : ...
156
152
157
153
class BoundedSemaphore (Semaphore ): ...
158
154
@@ -163,11 +159,10 @@ class Event:
163
159
def clear (self ) -> None : ...
164
160
def wait (self , timeout : Optional [float ] = ...) -> bool : ...
165
161
166
- if sys .version_info >= (3 , 8 ):
167
- from _thread import _excepthook , _ExceptHookArgs
162
+ from _thread import _excepthook , _ExceptHookArgs
168
163
169
- excepthook = _excepthook
170
- ExceptHookArgs = _ExceptHookArgs
164
+ excepthook = _excepthook
165
+ ExceptHookArgs = _ExceptHookArgs
171
166
172
167
class Timer (Thread ):
173
168
args : Iterable [Any ]
0 commit comments