Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f3a9faba
Commit
f3a9faba
authored
Feb 27, 2017
by
Xiang Zhang
Committed by
GitHub
Feb 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236)
parent
1f5639c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
Lib/test/test_threading.py
Lib/test/test_threading.py
+3
-0
Lib/threading.py
Lib/threading.py
+4
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/test_threading.py
View file @
f3a9faba
...
...
@@ -170,6 +170,9 @@ class ThreadTests(BaseTestCase):
mutex.acquire()
self.assertIn(tid, threading._active)
self.assertIsInstance(threading._active[tid], threading._DummyThread)
#Issue 29376
self.assertTrue(threading._active[tid].is_alive())
self.assertRegex(repr(threading._active[tid]), '
_DummyThread
')
del threading._active[tid]
# PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently)
...
...
Lib/threading.py
View file @
f3a9faba
...
...
@@ -1217,6 +1217,10 @@ class _DummyThread(Thread):
def
_stop
(
self
):
pass
def
is_alive
(
self
):
assert
not
self
.
_is_stopped
and
self
.
_started
.
is_set
()
return
True
def
join
(
self
,
timeout
=
None
):
assert
False
,
"cannot join a dummy thread"
...
...
Misc/NEWS
View file @
f3a9faba
...
...
@@ -249,6 +249,8 @@ Extension Modules
Library
-------
-
bpo
-
29376
:
Fix
assertion
error
in
threading
.
_DummyThread
.
is_alive
().
-
bpo
-
28624
:
Add
a
test
that
checks
that
cwd
parameter
of
Popen
()
accepts
PathLike
objects
.
Patch
by
Sayan
Chowdhury
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment