mirror of
https://github.com/python/cpython.git
synced 2025-09-11 19:27:07 +00:00
Use PyErr_WarnPy3k throughout
This commit is contained in:
parent
a692c4df63
commit
9f4f48114f
14 changed files with 47 additions and 88 deletions
|
@ -172,10 +172,8 @@ sys_exc_clear(PyObject *self, PyObject *noargs)
|
|||
PyThreadState *tstate;
|
||||
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
||||
|
||||
if (Py_Py3kWarningFlag &&
|
||||
PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"sys.exc_clear() not supported in 3.x; "
|
||||
"use except clauses") < 0)
|
||||
if (PyErr_WarnPy3k("sys.exc_clear() not supported in 3.x; "
|
||||
"use except clauses", 1) < 0)
|
||||
return NULL;
|
||||
|
||||
tstate = PyThreadState_GET();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue