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:
Dong-hee Na 2019-01-17 21:14:45 +09:00 committed by Victor Stinner
parent 97e12996f3
commit 89669ffe10
5 changed files with 17 additions and 4 deletions

View file

@ -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()