Message191546
| Author |
brett.cannon |
| Recipients |
barry, brett.cannon, dmi.baranov, eric.smith, jcea, pconnell, rhettinger |
| Date |
2013年06月21日.01:09:29 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1371776972.22.0.218148643337.issue17630@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|