summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_functoolsmodule.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 564c271..64766b4 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -203,14 +203,7 @@ partial_descr_get(PyObject *self, PyObject *obj, PyObject *type)
if (obj == Py_None || obj == NULL) {
return Py_NewRef(self);
}
- if (PyErr_WarnEx(PyExc_FutureWarning,
- "functools.partial will be a method descriptor in "
- "future Python versions; wrap it in staticmethod() "
- "if you want to preserve the old behavior", 1) < 0)
- {
- return NULL;
- }
- return Py_NewRef(self);
+ return PyMethod_New(self, obj);
}
/* Merging keyword arguments using the vectorcall convention is messy, so