> > - Was the ExternalNames dictionary really necessary? > > Yikes! that is where I record the zip file contents. That > avoids the linear search. So what would have been the problem with linear search that makes this extra data structure strictly necessary to have? > This isn't an issue of zip importing per se. It is the > avoidance of phase errors during start up. For example, > you need a full valid sys.path to be able to import zlib.pyd > (on Windows) so you read a compressed zip archive. Then > you import site.py plus whatever it imports. This must be > available in the zip standard lib file, so zip importing > must already work. Thus the need for careful bootstrapping. I think you can't really cover all cases. For example, your patch fails to find zlib in the Unix build tree, as the build directory is added to sys.path only in site.py, and your patch won't attempt to import zlib outside InitZip. So it might have been good to explain somewhere what bootstrapping scenarios this patch is meant to support. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4