[Import-SIG] PEP 402: specification questions

Nick Coghlan ncoghlan at gmail.com
Thu Nov 10 07:53:21 CET 2011


On Thu, Nov 10, 2011 at 4:31 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Thu, Nov 10, 2011 at 3:32 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>> However, with PEP 382, they don't *have* to do that: some portions
>> of a namespace package may keep the __init__.py, others may drop it,
>> and it would still form a single namespace. OTOH, with PEP 402,
>> *all* portions of the namespace would have simultaneously to agree
>> to use the PEP 402 mechanism, since that mechanism will be ineffective
>> if there is an __init__.py.
>
> That's a pretty good argument in favour of dropping the
> "self-contained package" concept from PEP 402, but aside from that
> aspect, it doesn't help decide between the two.

Actually, scratch that part of my response. *Existing* namespace
packages that work properly already have a single owner - the one that
creates the __init__.py file and sets up the namespace extension
mechanisms.  They're forced to work that way due to the file collision
problem.

With PEP 402, those owning packages are the only ones that would have
to change. With PEP 382, all the *other* distro packages have to
change as well (either directly, or via the packaging utilities
modifying path names on installation - in which case, good luck
running any affected code from an uninstalled source tree).

It seems I now remember at least some of the reasons why we didn't
like the "directory extension" idea the first time it was suggested :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Import-SIG mailing list