[issue24794] PyZipFile mixes compiled files from different python versions.

2015-08-05 Thread Amund Hov

New submission from Amund Hov:

In my project I have a mixture of scripts using Python 2.7 and 3.4.
Some of the scripts using python 3.4 are packaged into archives using
PyZipFile.

Through some combination I ended up with 2.7 compiled packages in my archive 
when packaging using python 3.4. In combination with issue 24792 zipimporter 
masks import errors this led to many grey hairs figuring out why my packaging 
scripts suddenly broke.

Are there sufficient provisions in PyZipFile to prevent this? It seems it will 
happily mix compiled files with differing magic bytes.

--
messages: 248024
nosy: Amund Hov
priority: normal
severity: normal
status: open
title: PyZipFile mixes compiled files from different python versions.
type: behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24794
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24794] PyZipFile mixes compiled files from different python versions.

2015-08-05 Thread R. David Murray

R. David Murray added the comment:

Yes, that used to be a general problem with .pyc files before we introduced 
__pycache__.  PyZipFile still supports the legacy mode by using whatever .pyc 
file is there, if there is one.  Perhaps it is time to deprecate the legacy 
mode in 3.6?

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24794
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com