File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,9 @@ def f(mutex):
170
170
mutex .acquire ()
171
171
self .assertIn (tid , threading ._active )
172
172
self .assertIsInstance (threading ._active [tid ], threading ._DummyThread )
173
+ #Issue 29376
174
+ self .assertTrue (threading ._active [tid ].is_alive ())
175
+ self .assertRegex (repr (threading ._active [tid ]), '_DummyThread' )
173
176
del threading ._active [tid ]
174
177
175
178
# PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently)
Original file line number Diff line number Diff line change @@ -1215,6 +1215,10 @@ def __init__(self):
1215
1215
def _stop (self ):
1216
1216
pass
1217
1217
1218
+ def is_alive (self ):
1219
+ assert not self ._is_stopped and self ._started .is_set ()
1220
+ return True
1221
+
1218
1222
def join (self , timeout = None ):
1219
1223
assert False , "cannot join a dummy thread"
1220
1224
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ Extension Modules
32
32
Library
33
33
-------
34
34
35
+ - bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
36
+
35
37
- bpo-29110: Fix file object leak in aifc.open() when file is given as a
36
38
filesystem path and is not in valid AIFF format. Patch by Anthony Zhang.
37
39
You can’t perform that action at this time.
0 commit comments