From 91fb0afe181986b48abfc6092dcca912b39de51d Mon Sep 17 00:00:00 2001 From: Oren Milman Date: Sun, 24 Sep 2017 21:27:12 +0300 Subject: bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (#3219) --- Python/_warnings.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Python/_warnings.c') 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; -- cgit v1.2.1