[Import-SIG] PEP 420: Implicit Namespace Packages

martin at v.loewis.de martin at v.loewis.de
Sat May 5 20:57:42 CEST 2012

> Why can't we modify whatever PEP to simply mark namespace package
> with '__init__.pyp' or some other special file?

That file name would not work, as then portions of the namespace would
all install the same file, which causes conflicts in platform packaging
tools (if the portions get installed into the same sys.path entry).

> Why rename directories,
> introduce ugly suffixes, deal with all the weirdness of importing
> just plain directories and guessing that they are namespace packages,
> ignoring content in __init__.py etc, instead of plain simple file
> marker?

Hence the current PEP doesn't propose to rename directories, and
does not introduce ugly suffixes. As for the weirdness of importing
just plain directories: yes, it does that.

> With PEP 382, the migration path is:
> 1. delete all __init__.py files from namespace package portions
> 2. rename the directories for all namespace package portions to append
> the ".pyp" extension

Please understand that an earlier version of the PEP did indeed
propose to use marker files instead of directories. You are, of
course, free to reiterate four years of discussion in a single
week, but please do familiarize yourself with the matter first.

After that, you likely have to write a PEP if you want your
idea to be seriously considered.


More information about the Import-SIG mailing list