[Import-SIG] PEP 420: Implicit Namespace Packages

Eric V. Smith eric at trueblade.com
Fri May 4 03:21:44 CEST 2012


On 05/03/2012 09:05 PM, Nick Coghlan wrote:
> On Fri, May 4, 2012 at 10:05 AM, PJ Eby <pje at telecommunity.com> wrote:

>> Still seems like a wart, but oh well.  OTOH, maybe it's better for people
>> munging __file__ to get a weird error all the time with namespace packages,
>> instead of something that works some of the time, and fails later?
> 
> Right. Otherwise we'd get layout dependent behaviour where dubious
> cross-portion references worked if all portions were installed to the
> same path segment, but then failed if they were split across multiple
> segments.

Under no circumstances should anyone be looking at __file__ for a
namespace package in order to find a related file. We should do
something that causes this to always break.

Eric.


More information about the Import-SIG mailing list