diff options
author | Oren Milman <orenmn@gmail.com> | 2017-09-24 21:27:12 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-09-24 21:27:12 +0300 |
commit | 91fb0afe181986b48abfc6092dcca912b39de51d (patch) | |
tree | 39c1f5061e7e3184cd52f5aab3ca56c37cf14e3d /Python/_warnings.c | |
parent | 8337239d792bc2098c592def5fc3af84c3b0dfd1 (diff) | |
download | cpython-git-91fb0afe181986b48abfc6092dcca912b39de51d.tar.gz |
bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (#3219)
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index f6688b0406..f56e92d2c1 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -893,9 +893,7 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds) } /* Split the source into lines. */ - source_list = PyObject_CallMethodObjArgs(source, - PyId_splitlines.object, - NULL); + source_list = PyUnicode_Splitlines(source, 0); Py_DECREF(source); if (!source_list) return NULL; |