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 @@ -1215,6 +1215,10 @@ def __init__(self):
12151215 def _stop (self ):
12161216 pass
12171217
1218+ def is_alive (self ):
1219+ assert not self ._is_stopped and self ._started .is_set ()
1220+ return True
1221+
12181222 def join (self , timeout = None ):
12191223 assert False , "cannot join a dummy thread"
12201224
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ Extension Modules
3232Library
3333-------
3434
35+ - bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
36+
3537- bpo-29110: Fix file object leak in aifc.open() when file is given as a
3638 filesystem path and is not in valid AIFF format. Patch by Anthony Zhang.
3739
You can’t perform that action at this time.
0 commit comments