[Import-SIG] PEP 420: Implicit Namespace Packages

Eric V. Smith eric at trueblade.com
Fri Apr 20 12:21:31 CEST 2012


On 4/19/2012 11:56 PM, Nick Coghlan wrote:
> On Fri, Apr 20, 2012 at 6:18 AM, Eric V. Smith <eric at trueblade.com> wrote:
>> This reflects (I hope!) the discussions at PyCon. My plan is to produce
>> an implementation based on the importlib code, and then flush out pieces
>> of the PEP.
> 
> This paragraph in the "Rationale" section is confusing:
> 
> "Namespace packages need to be installed in one of two ways: either
> all portions of a namespace will be combined into a single directory
> (and therefore a single entry in sys.path), or each portion will be
> installed in its own directory (and each portion will have a distinct
> sys.path entry)."
> 
> I would combine this with the following paragraph to make a single
> cohesive explanation of the problem that needs to be solved:
> 
> "Namespace packages are designed to support being split across
> multiple directories (and hence found via multiple sys.path entries).
> In this configuration, it doesn't matter if multiple portions all
> provide an __init__.py file, so long as each portion correctly
> initialises the namespace package. However, Linux distribution vendors
> (amongst others) prefer to combine the separate portions and install
> them all into the *same* filesystem directory. This creates a
> potential for conflict, as the portions are now attempting to provide
> the *same* file on the target system - something that is not allowed
> by many package managers. Allowing implicit namespace packages means
> that the requirement to provide an __init__.py file can be dropped
> completely, and affected portions can be installed into a common
> directory or split across multiple directories as distributions see
> fit."

That does read much better. Thanks.

>> In particular, I want to make sure the PEP addresses the various
>> objections that were raised, especially by Nick.
> 
> Yep. I'm happy with the conclusions we reached in the previous
> discussion, but PEP 420 does need to describe them. Here's the gist of
> it for the four points listed:

<discussion deleted>

I'll add these after I go back and re-read the original thread.

Eric.



More information about the Import-SIG mailing list