mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Fix a backwards-compatibility mistake where a new optional argument for
warnings.showwarning() was being used. This broke pre-existing replacements for the function since they didn't support the extra argument. Closes issue 2705.
This commit is contained in:
parent
0c65fe606e
commit
b457ddaff2
2 changed files with 3 additions and 4 deletions
|
@ -382,9 +382,6 @@ warn_explicit(PyObject *category, PyObject *message,
|
|||
|
||||
res = PyObject_CallFunctionObjArgs(show_fxn, message, category,
|
||||
filename, lineno_obj,
|
||||
Py_None,
|
||||
sourceline ?
|
||||
sourceline: Py_None,
|
||||
NULL);
|
||||
Py_DECREF(show_fxn);
|
||||
Py_XDECREF(res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue