diff options
-rw-r--r-- | Misc/NEWS | 4 | ||||
-rw-r--r-- | Python/_warnings.c | 3 |
2 files changed, 3 insertions, 4 deletions
@@ -40,7 +40,9 @@ Extension Modules - Issue #1631171: Re-implement the 'warnings' module in C (the original Python code has been kept as backup). This will allow for using the 'warning's machinery in such places as the parser where use of pure Python code is not - possible. + possible. Both the ``showarning()`` and ``formatwarning()`` gain an + optional 'line' argument which is not called by default for + backwards-compatibility reasons. Library ------- diff --git a/Python/_warnings.c b/Python/_warnings.c index 88afade..8f575ca 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -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); |