cpython: 873760b02024 (original) (raw)

Mercurial > cpython

changeset 103778:873760b02024

Issue #28131: Merge from 3.6 [#28131]

Berker Peksag berker.peksag@gmail.com
date Wed, 14 Sep 2016 08:11:15 +0300
parents 6bcedf96d25f(current diff)7a6c0c4e6072(diff)
children f3df6b16af7d
files Misc/NEWS
diffstat 3 files changed, 17 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_zipimport.py 13 Misc/NEWS 3 Modules/zipimport.c 2

line wrap: on

line diff

--- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -532,6 +532,19 @@ class UncompressedZipImportTestCase(Impo "some.data": (NOW, "some data")} self.doTest(pyc_ext, files, TESTMOD)

+ def testImport_WithStuff(self): # try importing from a zipfile which contains additional # stuff at the beginning of the file

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.7.0 alpha 1 Core and Builtins ----------------- +- Issue #28131: Fix a regression in zipimport's compile_source(). zipimport

--- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -1370,7 +1370,7 @@ compile_source(PyObject *pathname, PyObj } code = Py_CompileStringObject(PyBytes_AsString(fixed_source),

Py_DECREF(fixed_source); return code;