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
44046fe4
Commit
44046fe4
authored
Aug 13, 2019
by
Dong-hee Na
Committed by
Victor Stinner
Aug 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37804: Remove the deprecated method threading.Thread.isAlive() (GH-15225)
parent
f9590edf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
12 deletions
+6
-12
Doc/whatsnew/3.9.rst
Doc/whatsnew/3.9.rst
+4
-0
Lib/test/test_threading.py
Lib/test/test_threading.py
+0
-2
Lib/threading.py
Lib/threading.py
+0
-10
Misc/NEWS.d/next/Library/2019-08-12-23-07-47.bpo-37804.Ene6L-.rst
...S.d/next/Library/2019-08-12-23-07-47.bpo-37804.Ene6L-.rst
+2
-0
No files found.
Doc/whatsnew/3.9.rst
View file @
44046fe4
...
...
@@ -186,6 +186,10 @@ Removed
removed. They were deprecated since Python 3.7.
(Contributed by Victor Stinner in :issue:`37320`.)
* The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread`
has been removed. It was deprecated since Python 3.8.
Use :meth:`~threading.Thread.is_alive()` instead.
(Contributed by Dong-hee Na in :issue:`37804`.)
Porting to Python 3.9
=====================
...
...
Lib/test/test_threading.py
View file @
44046fe4
...
...
@@ -422,8 +422,6 @@ class ThreadTests(BaseTestCase):
t
.
setDaemon
(
True
)
t
.
getName
()
t
.
setName
(
"name"
)
with
self
.
assertWarnsRegex
(
DeprecationWarning
,
'use is_alive()'
):
t
.
isAlive
()
e
=
threading
.
Event
()
e
.
isSet
()
threading
.
activeCount
()
...
...
Lib/threading.py
View file @
44046fe4
...
...
@@ -1088,16 +1088,6 @@ class Thread:
self
.
_wait_for_tstate_lock
(
False
)
return
not
self
.
_is_stopped
def
isAlive
(
self
):
"""Return whether the thread is alive.
This method is deprecated, use is_alive() instead.
"""
import
warnings
warnings
.
warn
(
'isAlive() is deprecated, use is_alive() instead'
,
DeprecationWarning
,
stacklevel
=
2
)
return
self
.
is_alive
()
@
property
def
daemon
(
self
):
"""A boolean value indicating whether this thread is a daemon thread.
...
...
Misc/NEWS.d/next/Library/2019-08-12-23-07-47.bpo-37804.Ene6L-.rst
0 → 100644
View file @
44046fe4
Remove the deprecated method `threading.Thread.isAlive()`. Patch by Dong-hee
Na.
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