[Import-SIG] Is ".ns" really the right extension?

Eric Snow ericsnowcurrently at gmail.com
Sun Jul 10 06:11:57 CEST 2011

On Sat, Jul 9, 2011 at 9:50 PM, P.J. Eby <pje at telecommunity.com> wrote:
> At 04:58 PM 7/9/2011 -0600, Eric Snow wrote:
>> If two contributions are added into the same directory (a la that last
>> example) is there a way of telling programatically what portions came
>> from which contribution?
> See PEP 376, which addresses that issue.
>> Also, if two contributions are made to a namespace package on the same
>> sys.path entry, they must go into the same directory, right?
> Yes.
>>  Is there
>> a way around that, like using zip files or something (might we find
>> all three above examples in site-packages)?  The idea of having them
>> in separate plain directories (without __init__.py) for the same
>> sys.path entry is part of what motivated my earlier confusion.
> Where did you get that idea from?  Was there a particular part of the PEP I
> should change to avoid creating that idea, or did you have it before you
> read the new draft?

I wish I could pin crazy things like that on someone else, but I'm
afraid it's my own.  Not having used namespace packages before I was
trying to piece together the concept from bits and pieces when Barry
brought up their sprint last month.  It took this long to get through
to me that I was a little backwards.  :)

>> Finally, say a portion is "contributed" to an existing non-namespace
>> package [directory], turning it into a namespace package.  The package
>> is then impacted by PEP 382 (particularly regarding __init__.py) when
>> it may not have been developed for use as a namespace package.  Is
>> this case worth considering?
> The same thing would happen now if you installed two distributions
> containing files for the same package.  So no, I don't think it's worth
> elaborating on.  The PEP is starting to get kind of long as it is; I'm
> already a little worried about backlash when this goes back to Python-Dev,
> actually, *despite* the fact that it's more precisely specified, simpler,
> etc. than the previous shorter version.   :-(

Yeah, I agree.  For what it's worth, I think the PEP is a lot clearer now.


More information about the Import-SIG mailing list