[Import-SIG] PEP 420: Implicit Namespace Packages

Eric V. Smith eric at trueblade.com
Sat May 5 18:20:24 CEST 2012

On 5/5/2012 12:06 PM, Yury Selivanov wrote:
> On 2012-05-05, at 9:18 AM, Nick Coghlan wrote:
>> Now rename zope/ to zope.pyp/ in a full Zope checkout and see how much
>> noise you get.
> Why can't we modify whatever PEP to simply mark namespace package
> with '__init__.pyp' or some other special file?  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?

Because it doesn't solve the problem of wanting to distribute namespace
packages in pieces, using platform package managers, and installing them
all into the same directory. If you do this, your __init__.pyp would
need to be shipped with each portion's .rpm or .deb file. Platform
package managers don't typically like a single file being included with
multiple packages. You can factor it out into yet another package, but
then you need to have every namespace package portion depend on it.

This is described in PEP 420, and I think also 382.


More information about the Import-SIG mailing list