[Import-SIG] direct access of import state (e.g. modules replacing themselves in sys.modules)

Nick Coghlan ncoghlan at gmail.com
Mon May 30 23:16:03 EDT 2016

On 29 May 2016 3:10 pm, "Eric Snow" <ericsnowcurrently at gmail.com> wrote:
> Looking through all the code, I don't think it's worth it (for now) to
> worry about using an import "system" that isn't hooked up to the
> import state in sys.  I'll still look into a more isolated import
> "system" abstraction later through. :)

That's basically why PEP 406 stalled - the associated GSoC project showed
that the problem was more complex than I first thought (due to separate
problems with passing state to import statements in the imported code and
the process global nature of extension module loading).

It's also worth keeping in mind that many of the recent changes to better
support advanced use cases like lazy module loading and letting Cython
better emulate pure Python import semantics are already still deeply
mystifying to folks with more prosaic needs like "given a path, import that
file as a module":

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/import-sig/attachments/20160531/f7731e7e/attachment.html>

More information about the Import-SIG mailing list