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):
170170 mutex .acquire ()
171171 self .assertIn (tid , threading ._active )
172172 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' )
173176 del threading ._active [tid ]
174177
175178 # 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):
12171217 def _stop (self ):
12181218 pass
12191219
1220+ def is_alive (self ):
1221+ assert not self ._is_stopped and self ._started .is_set ()
1222+ return True
1223+
12201224 def join (self , timeout = None ):
12211225 assert False , "cannot join a dummy thread"
12221226
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ Extension Modules
6969Library
7070-------
7171
72+ - bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
73+
7274- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
7375 PathLike objects. Patch by Sayan Chowdhury.
7476
You can’t perform that action at this time.
0 commit comments