diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-09-27 04:38:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 04:38:03 (GMT) |
commit | 90fe25a051bd8cf64d52be533c9b60cad9bdd7fb (patch) | |
tree | 48e970eec5fd39ccd8f26e576fdeb3a1a0fae3f9 /Python | |
parent | bdb215b18a42360b6a9c82876fa71f19ca1a416d (diff) | |
download | cpython-90fe25a051bd8cf64d52be533c9b60cad9bdd7fb.zip cpython-90fe25a051bd8cf64d52be533c9b60cad9bdd7fb.tar.gz cpython-90fe25a051bd8cf64d52be533c9b60cad9bdd7fb.tar.bz2 |
[3.6] bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (GH-3219) (#3775)
(cherry picked from commit 91fb0afe181986b48abfc6092dcca912b39de51d)
Diffstat (limited to 'Python')
-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 b074788..ef6ed00 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -900,9 +900,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; |