Brett Cannon added the comment:

What Phil is after is a hook at the C level that will allow him to modify the 
sys module to add something to sys.meta_path to remove PathEntryFinder and put 
in his own importer (assuming he isn't simply freezing everything).

And yes, you should be able to run the stdlib from a zipfile, but the issue 
here is all the stuff Python imports as part of startup before the first bit of 
user Python code is executed, e.g. the encodings module. Since zipimport is 
added by importlib it gets special treatment  to be usable ASAP. Since Phil 
wants to completely skew standard import mechanisms this does require a C hook.

What this all means is that Phil really needs 
https://www.python.org/dev/peps/pep-0432/ to happen so that he can easily get 
his hook point added into the startup sequence.

----------
nosy: +brett.cannon

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26007>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to