summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-07 01:50:25 (GMT)
committerGitHub <noreply@github.com>2022-10-07 01:50:25 (GMT)
commitd163d5976dbb07ed7bc157260ab29452f940b567 (patch)
treee921f91dab49ac6ac51c6a851c6da4ae0cf1bc8a /Modules
parentc9d0a7a6bc2f5d5521452790fb4885bb21deca15 (diff)
downloadcpython-d163d5976dbb07ed7bc157260ab29452f940b567.zip
cpython-d163d5976dbb07ed7bc157260ab29452f940b567.tar.gz
cpython-d163d5976dbb07ed7bc157260ab29452f940b567.tar.bz2
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 09de8d7aafece264720afbca3052a63eee413b73) Co-authored-by: Guido van Rossum <guido@python.org>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_asynciomodule.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 49f1ce3..d503018 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -1116,16 +1116,6 @@ static PyObject *
_asyncio_Future_cancel_impl(FutureObj *self, PyObject *msg)
/*[clinic end generated code: output=3edebbc668e5aba3 input=925eb545251f2c5a]*/
{
- if (msg != Py_None) {
- if (PyErr_WarnEx(PyExc_DeprecationWarning,
- "Passing 'msg' argument to Future.cancel() "
- "is deprecated since Python 3.11, and "
- "scheduled for removal in Python 3.14.",
- 2))
- {
- return NULL;
- }
- }
ENSURE_FUTURE_ALIVE(self)
return future_cancel(self, msg);
}
@@ -2206,16 +2196,6 @@ static PyObject *
_asyncio_Task_cancel_impl(TaskObj *self, PyObject *msg)
/*[clinic end generated code: output=c66b60d41c74f9f1 input=7bb51bf25974c783]*/
{
- if (msg != Py_None) {
- if (PyErr_WarnEx(PyExc_DeprecationWarning,
- "Passing 'msg' argument to Task.cancel() "
- "is deprecated since Python 3.11, and "
- "scheduled for removal in Python 3.14.",
- 2))
- {
- return NULL;
- }
- }
self->task_log_tb = 0;
if (self->task_state != STATE_PENDING) {