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 @@ -1217,6 +1217,10 @@ def __init__(self):
1217
1217
def _stop (self ):
1218
1218
pass
1219
1219
1220
+ def is_alive (self ):
1221
+ assert not self ._is_stopped and self ._started .is_set ()
1222
+ return True
1223
+
1220
1224
def join (self , timeout = None ):
1221
1225
assert False , "cannot join a dummy thread"
1222
1226
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ Extension Modules
69
69
Library
70
70
-------
71
71
72
+ - bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
73
+
72
74
- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
73
75
PathLike objects. Patch by Sayan Chowdhury.
74
76
You can’t perform that action at this time.
0 commit comments