Re: PEP 489: Multi-phase extension module initialization; version 5
Petr Viktorin <[email protected]> Thu, 21 May 2015 10:21:03 +0200
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CA+=+wqCSa_M6DMRKzP=z5721Uiu7g29tEda_Qd7tVJg_P+aB3g@mail.gmail.com> |
On Wed, May 20, 2015 at 4:07 PM, Eric Snow <[email protected]> wrote: > On Wed, May 20, 2015 at 2:37 AM, Petr Viktorin <[email protected]> wrote: >> On 05/20/2015 02:33 AM, Eric Snow wrote: > [snip] >>> Won't frozen modules be likewise affected? >> >> No, frozen modules are Python source, just not loaded from a file. > > Isn't the mechanism similar to builtins? No. FrozenImporter loads bytecode from a compiled-in marshalled string, and then exec() it. It's completely different. > Regardless, I was hopeful that we could fix FrozenImporter at the same time > that we fixed BuiltinImporter. I'm not sure what's to fix in FrozenImporter (it uses create_module/exec_module already, is there something else?), but I doubt this PEP is the right place.