[Import-SIG] Import engine PEP up on python.org

"Martin v. Löwis" martin at v.loewis.de
Sun Nov 13 09:28:22 CET 2011

Am 13.11.2011 06:12, schrieb Nick Coghlan:
> I finally got around to updating the import engine draft PEP and
> publishing it on python.org: http://www.python.org/dev/peps/pep-0406/

I think the rationale section needs to be improved. In fact, I still
don't understand what the objective of this API is (I do understand what
it achieves, but it's unclear why having that is desirable, and for what

I notice that there is overlap both with multiple subinterpreters,
and with restricted execution. It hints at providing both, but actually
provides neither.

I think the long-term solution really should be proper support for
subinterpreters, where there is no global state in C at all. Extension
modules already can achieve this through the PEP 3121 API (even though
few modules actually do).

If the objective is to have more of the import machinery implemented in
Python, then making importlib the import machinery might be best.

If the objective is to allow hooks into the import procedure, it would
be best to just provide the hooks. OTOH, PEP 302 already defined hooks,
and it seems that people are happy with these.


More information about the Import-SIG mailing list