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.
This commit is contained in:
Guido van Rossum 2022-10-06 17:30:27 -07:00 committed by GitHub
parent c46a423a52
commit 09de8d7aaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 102 deletions

View file

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