cpython: 7bec326972f5 (original) (raw)

Mercurial > cpython

changeset 103776:7bec326972f5 3.5

Issue #28131: Fix a regression in zipimport's compile_source() zipimport should use the same optimization level as the interpreter. [#28131]

Berker Peksag berker.peksag@gmail.com
date Wed, 14 Sep 2016 08:09:48 +0300
parents 36550e4f9b4c
children 7a6c0c4e6072 2fb148cd95a2
files Lib/test/test_zipimport.py Misc/NEWS Modules/zipimport.c
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 @@ -513,6 +513,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 @@ Release date: TBA 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;