commit | 91fb0afe181986b48abfc6092dcca912b39de51d | [log] [tgz] |
---|---|---|
author | Oren Milman <orenmn@gmail.com> | Sun Sep 24 21:27:12 2017 +0300 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Sun Sep 24 21:27:12 2017 +0300 |
tree | 39c1f5061e7e3184cd52f5aab3ca56c37cf14e3d | |
parent | 8337239d792bc2098c592def5fc3af84c3b0dfd1 [diff] [blame] |
bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (#3219)
diff --git a/Python/_warnings.c b/Python/_warnings.c index f6688b0..f56e92d 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c
@@ -893,9 +893,7 @@ } /* 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;