Re: PEP 420: Implicit Namespace Packages

PJ Eby <[email protected]>
Newsgroups gmane.comp.python.import
Message-ID <CALeMXf4H9oqb+HJie3cLUPKxqbEh-Op51SG2gr9KR01K=RPC7w@mail.gmail.com>
I just want to chime in at this point that PEP 402 actually provides
rationale to answer a lot of the questions that are coming up in this
thread, and which are still valid in a PEP 420 world.  While some folks
have complained about PEP 402's length, they're mostly people who were
already present for all those discussions and hashing out of rationales.
;-)  (I actually wrote 402 with the intent of answering as many as possible
of these objections in advance, hence the length.)

(On a more serious note, it might help to crib some bits of 402's rationale
arguments into 420, so that we don't have to keep answering already-dead
proposals that keep coming up, like, "why can't you just add a special file
named xyz to fix this".)

On Sat, May 5, 2012 at 12:06 PM, Yury Selivanov <[email protected]>wrote:

> On 2012-05-05, at 9:18 AM, Nick Coghlan wrote:
> > Now rename zope/ to zope.pyp/ in a full Zope checkout and see how much
> > noise you get.
>
> Why can't we modify whatever PEP to simply mark namespace package
> with '__init__.pyp' or some other special file?  Why rename directories,
> introduce ugly suffixes, deal with all the weirdness of importing
> just plain directories and guessing that they are namespace packages,
> ignoring content in __init__.py etc, instead of plain simple file
> marker?
>
> In terms of steps (as Nick illustrated):
>
> With PEP 382, the migration path is:
> 1. delete all __init__.py files from namespace package portions
> 2. rename the directories for all namespace package portions to append
> the ".pyp" extension
>
> With PEP 420, the migration path is:
> 1. delete all __init__.py files from namespace package portions
> 2. there is no step 2
>
> With a marker:
> 1. $ mv __init__.py __init__.pyp
> 2. there is no step 2
>
> The first step can be even replaced with
> '$ rm __init__.py && touch __init__.pyp', as current __init__.py files
> of namespace packages contain only '__path__ = extend_path(__path__ ...)'
> crap.
>
> -
> Yury
> _______________________________________________
> Import-SIG mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/import-sig
>

_______________________________________________
Import-SIG mailing list
[email protected]
http://mail.python.org/mailman/listinfo/import-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.