[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2022-01-17 Thread László Kiss Kollár

Change by László Kiss Kollár :


--
nosy: +lkollar

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2020-11-16 Thread Brett Cannon


Change by Brett Cannon :


--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2020-11-13 Thread Brett Cannon


Change by Brett Cannon :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2018-09-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

zipimport has been rewritten in pure Python (issue25711).

--

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2016-02-02 Thread Łukasz Langa

Łukasz Langa added the comment:

If you're affected, there's a workaround. Use the following script to rewrite 
paths in your .zip file to be zipimport-compatible:

https://gist.github.com/ambv/909d38bdac4f3e719b7c

It preserves the preamble and all file metadata.

A little context why this is useful: for archives that are effectively "static" 
environments with entire dependency trees in them, this bug causes both a big 
slowdown in startup time (counted in seconds), as well as tens of megabytes of 
.pyc created on the fly. Examples include zipapp-style .pyz, Twitter's .pex or 
Facebook's .par. 

So while we're waiting for a new zipimport implementation, the workaround 
listed above should unblock people uzing this form of Python package 
distribution.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2015-11-23 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
nosy: +matrixise

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2015-11-23 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +superluser

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2015-11-23 Thread Robert Byrnes

New submission from Robert Byrnes:

zipimport is not PEP 3147 compliant: i.e., it looks for foo.pyc (in the same 
directory as foo.py) instead of __pycache__/foo.cpython-35.pyc.  This is 
counterintuitive, and unfortunate because it means that installation 
directories (that obey PEP 3147 conventions) can't be zip archived from 
filesystems and then used by zipimport.

When support for PEP 488 was added to Python 3.5, zipimport was modified to 
just delete references to .pyo files, but it needs to know about the new 
.opt-[12] filename components (as well as the PEP 3147 version tags).  As far 
as I can tell, the current version of zipimport can't import optimized bytecode 
files, using either the old or new filename conventions.

Finally, none of this behavior is documented.  The zipimport docs still mention 
.pyo files (which were eliminated by PEP 488), and say nothing about the 
filename conventions expected within zip archives.

--
components: Extension Modules
messages: 255178
nosy: byrnes
priority: normal
severity: normal
status: open
title: zipimport is not PEP 3147 or PEP 488 compliant
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2015-11-23 Thread Brett Cannon

Brett Cannon added the comment:

Not finding bytecode files is not that big of a deal. While it's a very minor 
performance loss, it isn't critical to how Python works (and since it looks for 
bytecode-only files that use-case isn't broken either).

But the real problem is that zipimport is such a nasty chunk of code that no 
one wants to fix it. Yet more evidence we just need to rewrite the whole 
module. I created issue #25711 to track a rewrite.

--
dependencies: +Rewrite zipimport from scratch

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2015-11-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, twouters

___
Python tracker 

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