[issue17630] Create a pure Python zipfile importer

Brett Cannon report at bugs.python.org
Fri Jun 21 03:09:32 CEST 2013


Brett Cannon added the comment:

Here is an initial stab at a zip file importer using importlib. Probably the biggest shortcoming is that it doesn't support bytecode files, but that's because I just have not bothered to add support yet (it's just one method to implement). There is a note in zipimport that the resolution does not match up between zip file modification times and what bytecode files store and so there needs to be a one second fuzzing factor but I'm not seeing why based on the fact that os.stat().st_mtime is used by bytecode files which has a one second resolution already like zip files. The other shortcoming is bytecode-only files are not supported (on purpose as importlib.abc.SourceLoader doesn't support bytecode-only files).

----------
keywords: +patch
Added file: http://bugs.python.org/file30659/zip_importlib.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17630>
_______________________________________


More information about the Python-bugs-list mailing list