diff options
author | Guido van Rossum <guido@python.org> | 2022-10-07 00:30:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 00:30:27 (GMT) |
commit | 09de8d7aafece264720afbca3052a63eee413b73 (patch) | |
tree | bce00a034fb3e8ca5235aac60d549d5c8415d610 /Lib/asyncio | |
parent | c46a423a520b797c3f8c81fef19293864742755d (diff) | |
download | cpython-09de8d7aafece264720afbca3052a63eee413b73.zip cpython-09de8d7aafece264720afbca3052a63eee413b73.tar.gz cpython-09de8d7aafece264720afbca3052a63eee413b73.tar.bz2 |
GH-90985: Revert "Deprecate passing a message into cancel()" (#97999)
Reason: we were too hasty in deprecating this.
We shouldn't deprecate it before we have a replacement.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/futures.py | 6 | ||||
-rw-r--r-- | Lib/asyncio/tasks.py | 5 |
2 files changed, 0 insertions, 11 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index 39776e3..3a6b44a 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -8,7 +8,6 @@ import concurrent.futures import contextvars import logging import sys -import warnings from types import GenericAlias from . import base_futures @@ -151,11 +150,6 @@ class Future: change the future's state to cancelled, schedule the callbacks and return True. """ - if msg is not None: - warnings.warn("Passing 'msg' argument to Future.cancel() " - "is deprecated since Python 3.11, and " - "scheduled for removal in Python 3.14.", - DeprecationWarning, stacklevel=2) self.__log_traceback = False if self._state != _PENDING: return False diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 8d6dfcd..5710137 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -210,11 +210,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 |