summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-04-27 03:01:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-04-27 03:01:45 (GMT)
commit9f4f48114fbf2df3803a44a30cd14e11679403fe (patch)
tree701fc350aa3a6ebf282fdb92e891c793f65db0fb /Objects/listobject.c
parenta692c4df63a41c42f2ce10a4521136d1440a712d (diff)
downloadcpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.zip
cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.gz
cpython-9f4f48114fbf2df3803a44a30cd14e11679403fe.tar.bz2
Use PyErr_WarnPy3k throughout
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 81617e4..e4e8ae4 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -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;