[Import-SIG] PEP 420: Implicit Namespace Packages

Antoine Pitrou solipsis at pitrou.net
Sat May 5 15:37:12 CEST 2012


On Sat, 5 May 2012 23:18:20 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> If your experiences differ, then fine, that's not going to help you
> accept the decision. But it doesn't matter *how* you come to terms
> with it, only that you do. That's really the only option here: Guido
> has flat out rejected PEP 382 because he doesn't like the idea of
> directory extensions. It's not coming back.

Then perhaps PEP 420 should be rejected too, because of the
complication it introduces.

I've done a Google code search and there doesn't seem to be much more
than a dozen projects using namespace packages (Zope, pygraph, a couple
of others):

http://code.google.com/codesearch#search&q=lang:python+declare_namespace
http://code.google.com/codesearch#search&q=lang:python+extend_path

The current idiom is not extremely pretty but it works, and it doesn't
seem to cause much trouble. The fact that setuptools proposes a
different idiom from pkgutil's is not due to the idiom itself, but
probably historical reasons: both idioms require a single import and a
single function call, so they are similarly expressive.

The lack-of-prettiness argument is quite underwhelming when there are
so few projects using namespace packages; and this is not something you
see when you only *use* the package, rather than develop it.

Regards

Antoine.


More information about the Import-SIG mailing list