diff --git a/Lib/threading.py b/Lib/threading.py index bb41456fb1410c2..5fc7cbe239cbbbf 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -1091,7 +1091,15 @@ def is_alive(self): self._wait_for_tstate_lock(False) return not self._is_stopped - isAlive = is_alive + def isAlive(self): + """Return whether the thread is alive. + + This instance method is deprecated, use is_alive() instead. + """ + import warnings + warnings.warn('isAlive() is deprecated, use is_alive() instead', + PendingDeprecationWarning, stacklevel=2) + return self.is_alive() @property def daemon(self): diff --git a/Misc/NEWS.d/next/Library/2019-01-07-17-17-16.bpo-35283.WClosC.rst b/Misc/NEWS.d/next/Library/2019-01-07-17-17-16.bpo-35283.WClosC.rst new file mode 100644 index 000000000000000..6c9c06eff2b5f9c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-01-07-17-17-16.bpo-35283.WClosC.rst @@ -0,0 +1,2 @@ +Add a deprecated warning for the threading.Thread.isAlive. +Patch by Dong-hee Na.