[Import-SIG] PEP 420: Implicit Namespace Packages

Eric V. Smith eric at trueblade.com
Fri May 4 17:17:13 CEST 2012

On 05/04/2012 11:14 AM, Nick Coghlan wrote:
> On Sat, May 5, 2012 at 12:34 AM, Barry Warsaw <barry at python.org> wrote:
>>  * Explicitly leave the assignment of __file__ to the loader.
>>  * Allow loaders to not set __file__
>>  * Add an optional API to loaders, module_repr() as defined above.
> I can accept that approach on one condition: the PEP 420
> implementation comes with the long-overdue migration of the definition
> of the import system semantics into the language reference.
> The main sticking point preventing that in the past has been that
> nobody wanted to document all the caveats and special cases needed to
> accurately describe CPython's behaviour. For 3.3+, no such caveats are
> necessary, since Brett's importlib efforts mean that even the default
> import system follows the rules.
> The proposed update will require changes to the description of the
> import semantics, anyway, so rather than making those changes directly
> in PEP 302, it would be better to document them in the language
> reference and update PEP 302 with a note to say that, for 3.3+, it is
> no longer the authoritative source.

We did discuss this yesterday at the sprint. I'm all for it, and I think
the others were, too.

I'm not keen on tying all of this to PEP 420 acceptance or rejection,
but it's not the end of the world.


More information about the Import-SIG mailing list