mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-90985: Revert "Deprecate passing a message into cancel()" (GH-97999)
Reason: we were too hasty in deprecating this.
We shouldn't deprecate it before we have a replacement.
(cherry picked from commit 09de8d7aaf
)
Co-authored-by: Guido van Rossum <guido@python.org>
This commit is contained in:
parent
c9d0a7a6bc
commit
d163d5976d
8 changed files with 12 additions and 102 deletions
|
@ -207,11 +207,6 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
|
|||
|
||||
This also increases the task's count of cancellation requests.
|
||||
"""
|
||||
if msg is not None:
|
||||
warnings.warn("Passing 'msg' argument to Task.cancel() "
|
||||
"is deprecated since Python 3.11, and "
|
||||
"scheduled for removal in Python 3.14.",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
self._log_traceback = False
|
||||
if self.done():
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue