mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Use PyErr_WarnPy3k throughout
This commit is contained in:
parent
a692c4df63
commit
9f4f48114f
14 changed files with 47 additions and 88 deletions
|
|
@ -2038,9 +2038,7 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds)
|
|||
if (compare == Py_None)
|
||||
compare = NULL;
|
||||
if (compare != NULL &&
|
||||
Py_Py3kWarningFlag &&
|
||||
PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"the cmp argument is not supported in 3.x") < 0)
|
||||
PyErr_WarnPy3k("the cmp argument is not supported in 3.x", 1) < 0)
|
||||
return NULL;
|
||||
if (keyfunc == Py_None)
|
||||
keyfunc = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue