Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread PJ Eby
On Sat, Nov 26, 2011 at 11:53 AM, Éric Araujo mer...@netwok.org wrote: Le 11/08/2011 20:30, P.J. Eby a écrit : At 04:39 PM 8/11/2011 +0200, Éric Araujo wrote: I’ll just regret that it's not possible to provide a module docstring to inform that this is a namespace package used for X and

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread Éric Araujo
Hi, Thanks for the replies. At this point, though, before doing any more work on the PEP I'd like to have some idea of whether there's any chance of it being accepted. At this point, there seems to be a lot of passive, Usenet nod syndrome type support for it, but little active support. If

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread Martin v. Löwis
If this helps, I am +1, and I’m sure other devs will chime in. I think the feature is useful, and I prefer 402’s way to 382’s pyp directories. If that's the obstacle to adopting PEP 382, it would be easy to revert the PEP back to having file markers to indicate package-ness. I insist on having

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread Nick Coghlan
On Thu, Dec 1, 2011 at 1:28 AM, PJ Eby p...@telecommunity.com wrote: It doesn't help at all that I'm not really in a position to provide an implementation, and the persons most likely to implement have been leaning somewhat towards 382, or wanting to modify 402 such that it uses .pyp directory

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-30 Thread Glyph
On Nov 30, 2011, at 6:39 PM, Nick Coghlan wrote: On Thu, Dec 1, 2011 at 1:28 AM, PJ Eby p...@telecommunity.com wrote: It doesn't help at all that I'm not really in a position to provide an implementation, and the persons most likely to implement have been leaning somewhat towards 382, or

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-11-26 Thread Éric Araujo
Hi, Going through my email backlog. Le 11/08/2011 20:30, P.J. Eby a écrit : At 04:39 PM 8/11/2011 +0200, Éric Araujo wrote: (By the way, both of these additions to the import protocol (i.e. the dynamically-added ``__path__``, and dynamically-created modules) apply recursively to child

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Vinay Sajip
Éric Araujo merwok at netwok.org writes: Besides, putting data files in a Python package is held very poorly by some (mostly people following the File Hierarchy Standard), and in distutils2/packaging, we (will) have a resources system that’s as convenient for users and more flexible for OS

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread P.J. Eby
At 02:02 PM 8/11/2011 -0400, Glyph Lefkowitz wrote: Rather than a one-by-one ad-hoc consideration of which attribute should be set to None or empty strings or string or what have you, I'd really like to see a discussion in the PEP saying what a package really is vs. what a module is, and what

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 11:24 AM, P.J. Eby wrote: That is, the above code hardocdes a variety of assumptions about the import system that haven't been true since Python 2.3. Thanks for this feedback. I honestly did not realize how old and creaky this code had gotten. It was originally

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread P.J. Eby
At 01:09 PM 8/12/2011 -0400, Glyph Lefkowitz wrote: Upon further reflection, PEP 402 _will_ make dealing with namespace packages from this code considerably easier: we won't need to do AST analysis to look for a __path__ attribute or anything gross like that improve correctness; we can just

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread Glyph Lefkowitz
On Aug 12, 2011, at 2:33 PM, P.J. Eby wrote: At 01:09 PM 8/12/2011 -0400, Glyph Lefkowitz wrote: Upon further reflection, PEP 402 _will_ make dealing with namespace packages from this code considerably easier: we won't need to do AST analysis to look for a __path__ attribute or anything

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-12 Thread P.J. Eby
At 05:03 PM 8/12/2011 -0400, Glyph Lefkowitz wrote: Are there any rules about passing invalid identifiers to __import__ though, or is that just less likely? :) I suppose you have a point there. ;-) I still like the idea of a 'marker' file. It would be great if there were a new marker like

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Barry Warsaw
On Aug 11, 2011, at 04:39 PM, Éric Araujo wrote: * XXX what is the __file__ of a pure virtual package? ``None``? Some arbitrary string? The path of the first directory with a trailing separator? No matter what we put, *some* code is going to break, but the last choice might allow

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Glyph Lefkowitz
On Aug 11, 2011, at 11:39 AM, Barry Warsaw wrote: On Aug 11, 2011, at 04:39 PM, Éric Araujo wrote: * XXX what is the __file__ of a pure virtual package? ``None``? Some arbitrary string? The path of the first directory with a trailing separator? No matter what we put, *some* code is

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Antoine Pitrou
On Thu, 11 Aug 2011 11:39:52 -0400 Barry Warsaw ba...@python.org wrote: On Aug 11, 2011, at 04:39 PM, Éric Araujo wrote: * XXX what is the __file__ of a pure virtual package? ``None``? Some arbitrary string? The path of the first directory with a trailing separator? No matter what

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread P.J. Eby
At 04:39 PM 8/11/2011 +0200, Éric Araujo wrote: Hi, I've read PEP 402 and would like to offer comments. Thanks. Minor: I would reserve packaging for packaging/distribution/installation/deployment matters, not Python modules. I suggest Python package semantics. Changing to Python package

Re: [Python-Dev] PEP 402: Simplified Package Layout and Partitioning

2011-08-11 Thread Nick Coghlan
On Fri, Aug 12, 2011 at 4:30 AM, P.J. Eby p...@telecommunity.com wrote: At 04:39 PM 8/11/2011 +0200, Éric Araujo wrote: The resulting list (whether empty or not) is then stored in a ``sys.virtual_package_paths`` dictionary, keyed by module name. This was probably said on import-sig, but