mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-35283: Add deprecation warning for Thread.isAlive (GH-11454)
Add a deprecated warning for the threading.Thread.isAlive() method.
This commit is contained in:
parent
97e12996f3
commit
89669ffe10
5 changed files with 17 additions and 4 deletions
|
@ -415,7 +415,8 @@ class ThreadTests(BaseTestCase):
|
|||
t.setDaemon(True)
|
||||
t.getName()
|
||||
t.setName("name")
|
||||
t.isAlive()
|
||||
with self.assertWarnsRegex(DeprecationWarning, 'use is_alive()'):
|
||||
t.isAlive()
|
||||
e = threading.Event()
|
||||
e.isSet()
|
||||
threading.activeCount()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue