Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

PEP 376

 

 

First page Previous page 1 2 3 4 Next page Last page  View All Python dev RSS feed   Index | Next | Previous | View Threaded


ziade.tarek at gmail

Jun 22, 2009, 6:23 AM

Post #1 of 93 (2017 views)
Permalink
PEP 376

Hello,

We have polished out PEP 376 and its code prototype at Distutils-SIG.
It seems to fullfill now all the requirements,
so I am mailing it here again, for a new round of feedback, if needed.

- the pep : http://svn.python.org/projects/peps/trunk/pep-0376.txt

- the code prototype : http://bitbucket.org/tarek/pep376/src/tip/pkgutil.py

Notice that if the PEP is accepted at this point, I will :

- focus on making the code work as fast as possible, for directories browsing

- work on the backport and the required patches for setuptools and pip
at the same time, and
see if I can get some beta-testers that are willing to switch to
this new version to test it extensively before
2.7/3.2 are out.

Regards
Tarek

--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

Jun 22, 2009, 7:59 AM

Post #2 of 93 (1965 views)
Permalink
Re: PEP 376 [In reply to]

Hello,

Tarek Ziadé <ziade.tarek <at> gmail.com> writes:
>
> so I am mailing it here again, for a new round of feedback, if needed.
>
> - the pep : http://svn.python.org/projects/peps/trunk/pep-0376.txt

Some comments:

- the **MD5** hash of the file, encoded in hex. Notice that `pyc` and `pyo`
generated files will not have a hash.

Why the exception for pyc and pyo files?

- `zlib` and `zlib-2.5.2.egg-info` are located in `site-packages` so the file
paths are relative to it.

Is it a general rule? That is, the paths in RECORD are always relative to its
grandparent directory?

The RECORD format
-----------------

The `RECORD` file is a CSV file, composed of records, one line per
installed file. The ``csv`` module is used to read the file, with
the `excel` dialect, which uses these options to read the file:

- field delimiter : `,`
- quoting char : `"`.
- line terminator : `\r\n`

Wouldn't it be better to use the native line terminator on the current
platform? (someone might want to edit or at least view the file)

What is the character encoding for non-ASCII filenames? UTF-8?

Are the RECORD file's contents somehow part of the DistributionMetadata?

- ``DistributionDirectories``: manages ``EggInfoDirectory`` instances.

What is an EggInfoDirectory ?

A plural class name looks strange (I think it's the first time I see one in
the CPython codebase). How about another name? (DistributionPool,
DistributionMap, WorkingSet etc.).

- ``get_egginfo_file(path, binary=False)`` -> file object

Returns a file located under the `.egg-info` directory.

Returns a ``file`` instance for the file pointed by ``path``.

Is it always a file instance or just a file-like object? (zipped distributions
come to mind). Is it opened read-only?

- ``owner(path)`` -> ``Distribution`` instance or None

If ``path`` is used by only one ``Distribution`` instance, returns it.
Otherwise returns None.

This is a bit confusing. If it returns None, it doesn't distinguish between the
case where several Distributions refer to the path, and the case where no
distributions refer to it, does it?

Is there any reason to have this method while file_users(path) already exists?

A new class called ``DistributionDirectories`` is created. It's a collection of
``DistributionDirectory`` and ``ZippedDistributionDirectory`` instances.
The constructor takes one optional argument ``use_cache`` set to ``True`` by
default.

You forgot to describe the constructor's signature and what it does exactly.

``EggInfoDirectories`` also provides the following methods besides the ones
from ``dict``::

What is EggInfoDirectories?

- ``append(path)``

Creates an ``DistributionDirectory`` (or ``ZippedDistributionDirectory``)
instance for ``path`` and adds it in the mapping.

- ``load(paths)``

Creates and adds ``DistributionDirectory`` (or
``ZippedDistributionDirectory``) instances corresponding to ``paths``.

Why are these methods named completely differently although they do almost the
same thing? Besides, append() makes it look like ordering matters. Does it?
(for a naming suggestion, e.g. load(path) and load_all(paths). Or,
even simpler, load(*paths) or load(paths))

- ``get_file_users(path)`` -> Iterator of ``Distribution`` (or
``ZippedDistribution``) instances.

This method is named file_users in another class. Perhaps the naming should be
consistent?

All these functions use the same global instance of ``DistributionDirectories``
to use the cache.

Is the global instance available to users?

>>> for path, hash, size in dist.get_installed_files()::
... print '%s %s %d %s' % (path, hash, size)

There's one too many "%s" here.


Thanks for your work!

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 22, 2009, 8:42 AM

Post #3 of 93 (1969 views)
Permalink
Re: PEP 376 [In reply to]

On Mon, Jun 22, 2009 at 4:59 PM, Antoine Pitrou <solipsis [at] pitrou> wrote:

> - the **MD5** hash of the file, encoded in hex. Notice that `pyc` and
> `pyo`
> generated files will not have a hash.
>
> Why the exception for pyc and pyo files?


As in PEP 262, since they are produced automatically from a py file,
checking the py file is enough
to decide if the file has changed.


>
> - `zlib` and `zlib-2.5.2.egg-info` are located in `site-packages` so the
> file
> paths are relative to it.
>
> Is it a general rule? That is, the paths in RECORD are always relative to
> its
> grandparent directory?



no, they can be located anywhere on the system. But when the paths are
located in the
same directory where the .egg-info directory is located, a relative path is
used. (see the section before this example)

I'll add an example that contains files located elswhere in the system (like
a script and a data file)



>
>
> The RECORD format
> -----------------
>
> The `RECORD` file is a CSV file, composed of records, one line per
> installed file. The ``csv`` module is used to read the file, with
> the `excel` dialect, which uses these options to read the file:
>
> - field delimiter : `,`
> - quoting char : `"`.
> - line terminator : `\r\n`
>
> Wouldn't it be better to use the native line terminator on the current
> platform? (someone might want to edit or at least view the file)


Good idea, I'll change that,


>
>
> What is the character encoding for non-ASCII filenames? UTF-8?
>

Yes, there's a constant in Distutils, called PKG_INFO_ENCODING that will be
used for the file generation.



>
> Are the RECORD file's contents somehow part of the DistributionMetadata?



The DistributionMetadata correspond to the fields defined in PEP 345, e.g.
written in the PKG-INFO file,
which is mentioned in the RECORD file.

We are reworking PEP 345 as well, to add some fields. What did you have in
mind ?


>
>
> - ``DistributionDirectories``: manages ``EggInfoDirectory`` instances.
>
> What is an EggInfoDirectory ?


Typo (old name), fixing this..


>
>
> A plural class name looks strange (I think it's the first time I see one in
> the CPython codebase). How about another name? (DistributionPool,
> DistributionMap, WorkingSet etc.).


Sure, WorkingSet is nice, it's the name used in setuptools,


>
>
> - ``get_egginfo_file(path, binary=False)`` -> file object
>
> Returns a file located under the `.egg-info` directory.
>
> Returns a ``file`` instance for the file pointed by ``path``.
>
> Is it always a file instance or just a file-like object? (zipped
> distributions
> come to mind). Is it opened read-only?



It's in read-only mode, either "r" either "rb" and in case of a zip file,
it returns a file-like object using zipfile.ZipFile.open.


>
> - ``owner(path)`` -> ``Distribution`` instance or None
>
> If ``path`` is used by only one ``Distribution`` instance, returns it.
> Otherwise returns None.
>
> This is a bit confusing. If it returns None, it doesn't distinguish between
> the
> case where several Distributions refer to the path, and the case where no
> distributions refer to it, does it?
>

The idea of this API is to find out of a distribution "owns" a file, e.g. is
the only distribution
that uses it, so it can be safely removed.


> Is there any reason to have this method while file_users(path) already
> exists?
>

Its just a helper for uninstallers, but file_users() could probably be
enough,
I can remove "owns" if people find it confusing,



> A new class called ``DistributionDirectories`` is created. It's a
> collection of
> ``DistributionDirectory`` and ``ZippedDistributionDirectory`` instances.
> The constructor takes one optional argument ``use_cache`` set to ``True``
> by
> default.
>
> You forgot to describe the constructor's signature and what it does
> exactly.
>

I'll add that,


>
> ``EggInfoDirectories`` also provides the following methods besides the
> ones
> from ``dict``::
>
> What is EggInfoDirectories?


This is a DistributionDirectories, one more instance I forgot to rename,
I'll fix that


>
>
> - ``append(path)``
>
> Creates an ``DistributionDirectory`` (or
> ``ZippedDistributionDirectory``)
> instance for ``path`` and adds it in the mapping.
>
> - ``load(paths)``
>
> Creates and adds ``DistributionDirectory`` (or
> ``ZippedDistributionDirectory``) instances corresponding to ``paths``.
>
> Why are these methods named completely differently although they do almost
> the
> same thing? Besides, append() makes it look like ordering matters. Does it?
> (for a naming suggestion, e.g. load(path) and load_all(paths). Or,
> even simpler, load(*paths) or load(paths))
>

Right, I'll fix that,



>
> - ``get_file_users(path)`` -> Iterator of ``Distribution`` (or
> ``ZippedDistribution``) instances.
>
> This method is named file_users in another class. Perhaps the naming should
> be
> consistent?


Right, it used to be get_*, that's a typo. I'll fix it,


>
>
> All these functions use the same global instance of
> ``DistributionDirectories``
> to use the cache.
>
> Is the global instance available to users?


No I didn't made it available to avoid concurrency problems,

>
>
> >>> for path, hash, size in dist.get_installed_files()::
> ... print '%s %s %d %s' % (path, hash, size)
>
> There's one too many "%s" here.
>

Fixing it too,



>
>
> Thanks for your work!
>


Thanks for the feedback, I'll commit the fixes asap.

Tarek


pje at telecommunity

Jun 22, 2009, 11:48 AM

Post #4 of 93 (1955 views)
Permalink
Re: PEP 376 [In reply to]

At 05:42 PM 6/22/2009 +0200, Tarek Ziadé wrote:
>Wouldn't it be better to use the native line terminator on the current
>platform? (someone might want to edit or at least view the file)
>
>
>Good idea, I'll change that,
>

As long as the file is always *read* with "U" mode, so that you can't
mess it up, especially if the install is to a directory shared
between platforms.


>The idea of this API is to find out of a distribution "owns" a file,
>e.g. is the only distribution
>that uses it, so it can be safely removed.

This could equally well be done by ``owners(path)``, returning a
sequence of zero or more items. Any length <> 1 means the file can't
be safely removed. Meanwhile, having the data about all the owners
of a file would also be useful for tools that just want to inspect a
directory's contents, for example, or to detect conflicts and overwrites.

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


kevin at bud

Jun 22, 2009, 6:41 PM

Post #5 of 93 (1948 views)
Permalink
Re: PEP 376 [In reply to]

>
>
> A plural class name looks strange (I think it's the first time I see
> one in
> the CPython codebase). How about another name? (DistributionPool,
> DistributionMap, WorkingSet etc.).
>
> Sure, WorkingSet is nice, it's the name used in setuptools,
>

A WorkingSet and a DistributionDirectories (or whatever it gets named
to) are different things though, no?

A WorkingSet is "a collection of active distributions", where each
distribution might come from different distribution directories:

http://peak.telecommunity.com/DevCenter/PkgResources#workingset-objects

Where as DistributionDirectories is a dictionary of locations where
distributions are installed. The WorkingSet may be comprised of
distributions from several different locations, and each location may
contain the same or different versions of the same distribution.

(as far as I understand things ...)

I can't really think of a better name for a dict of distribution
locations ... but then I'm not averse to a pluralized class name.

Overall though, I think PEP 376 is starting to look very good!

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 23, 2009, 1:29 AM

Post #6 of 93 (1947 views)
Permalink
Re: PEP 376 [In reply to]

2009/6/22 P.J. Eby <pje [at] telecommunity>:
> At 05:42 PM 6/22/2009 +0200, Tarek Ziadé wrote:
>>
>> Wouldn't it be better to use the native line terminator on the current
>> platform? (someone might want to edit or at least view the file)
>>
>>
>> Good idea, I'll change that,
>>
>
> As long as the file is always *read* with "U" mode, so that you can't mess
> it up, especially if the install is to a directory shared between platforms.

Adding that too, thanks;

>
>
>> The idea of this API is to find out of a distribution "owns" a file, e.g.
>> is the only distribution
>> that uses it, so it can be safely removed.
>
> This could equally well be done by ``owners(path)``, returning a sequence of
> zero or more items.  Any length <> 1 means the file can't be safely removed.
>  Meanwhile, having the data about all the owners of a file would also be
> useful for tools that just want to inspect a directory's contents, for
> example, or to detect conflicts and overwrites.

that's basically what "get_file_users" does except it's an iterator,

roughly that would be :

def get_file_owners(path):
return list(get_file_users(paths))

So I am wondering if it worth having it....



--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 23, 2009, 1:38 AM

Post #7 of 93 (1937 views)
Permalink
Re: PEP 376 [In reply to]

On Tue, Jun 23, 2009 at 3:41 AM, Kevin Teague<kevin [at] bud> wrote:
>>
>>
>> A plural class name looks strange (I think it's the first time I see one
>> in
>> the CPython codebase). How about another name? (DistributionPool,
>> DistributionMap, WorkingSet etc.).
>>
>> Sure, WorkingSet is nice, it's the name used in setuptools,
>>
>
> A WorkingSet and a DistributionDirectories (or whatever it gets named to)
> are different things though, no?
>
> A WorkingSet is "a collection of active distributions", where each
> distribution might come from different distribution directories:
>
> http://peak.telecommunity.com/DevCenter/PkgResources#workingset-objects
>
> Where as DistributionDirectories is a dictionary of locations where
> distributions are installed. The WorkingSet may be comprised of
> distributions from several different locations, and each location may
> contain the same or different versions of the same distribution.

DistributionDirectories can contain directories that are not located
in the same parent
directory, so I find it rather similar besides the "active" feature in
Python doesn't exist (yet)

In any case, maybe picking up a name that is not from setuptools will
be less confusing
for people that uses WorkingSet classes nowadays.

What about using the same names used in Python's site module:
"sitedir" is the name used for
a directory we named DistributionDirectory.

So what about :

DistributionDirectory -> SiteDir
DistributionDirectories -> SiteDirMap


++
Tarek
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ncoghlan at gmail

Jun 23, 2009, 2:57 AM

Post #8 of 93 (1956 views)
Permalink
Re: PEP 376 [In reply to]

Tarek Ziadé wrote:
> So what about :
>
> DistributionDirectory -> SiteDir
> DistributionDirectories -> SiteDirMap

'site' has too many connections to existing concepts for my liking
(site.py, sitesetup.py, site-packages).

Something like DistributionDirectoryMap should cover it.

You could probably get away with shortening "Directory" to "Dir" in the
class names though:

- Distribution
- ZippedDistribution
- DistributionDir
- ZippedDistributionDir
- DistributionDirMap

(Shortening Distribution to Dist might also be a possibility, but I
don't think that works well for the two basic classes, and if those use
the long form then shortening it for the *Dir and *DirMap classes would
just look odd)

Cheers,
Nick.


--
Nick Coghlan | ncoghlan [at] gmail | Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


sridharr at activestate

Jun 23, 2009, 12:45 PM

Post #9 of 93 (1928 views)
Permalink
Re: PEP 376 [In reply to]

On 09-06-23 02:57 AM, Nick Coghlan wrote:
> Something like DistributionDirectoryMap should cover it.
>
> You could probably get away with shortening "Directory" to "Dir" in the
> class names though:
>
> - Distribution
> - ZippedDistribution
> - DistributionDir
> - ZippedDistributionDir
> - DistributionDirMap

'Map' reminds me of an associated hash (or is it the actual map?).

Hence I suggest: DistributionSet

-srid
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


pje at telecommunity

Jun 23, 2009, 10:10 PM

Post #10 of 93 (1942 views)
Permalink
Re: PEP 376 [In reply to]

At 10:38 AM 6/23/2009 +0200, Tarek Ziadé wrote:
>What about using the same names used in Python's site module:
>"sitedir" is the name used for
>a directory we named DistributionDirectory.

No, a site dir is a Python-defined directory for site-installed
packages, and/or a directory where .pth files are processed. Wrong
connotations entirely, since packages may be installed to other
directories, and typically are in e.g. shared hosting environments.

DistributionDirectory is fine by me. DistributionDirectories sounds
like what setuptools calls an Environment.

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

Jun 24, 2009, 2:18 AM

Post #11 of 93 (1910 views)
Permalink
Re: PEP 376 [In reply to]

Sridhar Ratnakumar <sridharr <at> activestate.com> writes:
>
> On 09-06-23 02:57 AM, Nick Coghlan wrote:
> > Something like DistributionDirectoryMap should cover it.
> >
> > You could probably get away with shortening "Directory" to "Dir" in the
> > class names though:
> >
> > - Distribution
> > - ZippedDistribution
> > - DistributionDir
> > - ZippedDistributionDir
> > - DistributionDirMap
>
> 'Map' reminds me of an associated hash (or is it the actual map?).

Good thing, because it is a dict subclass if you read the PEP :)

+1 with Nick's proposal.

(we are good at finding bikesheds everywhere aren't we?)


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 24, 2009, 12:54 PM

Post #12 of 93 (1940 views)
Permalink
Re: PEP 376 [In reply to]

On Wed, Jun 24, 2009 at 11:18 AM, Antoine Pitrou<solipsis [at] pitrou> wrote:
> Sridhar Ratnakumar <sridharr <at> activestate.com> writes:
>>
>> On 09-06-23 02:57 AM, Nick Coghlan wrote:
>> > Something like DistributionDirectoryMap should cover it.
>> >
>> > You could probably get away with shortening "Directory" to "Dir" in the
>> > class names though:
>> >
>> >   - Distribution
>> >   - ZippedDistribution
>> >   - DistributionDir
>> >   - ZippedDistributionDir
>> >   - DistributionDirMap
>>
>> 'Map' reminds me of an associated hash (or is it the actual map?).
>
> Good thing, because it is a dict subclass if you read the PEP :)
>
> +1 with Nick's proposal.
>

I've changed using these names. Any other feedback with this PEP or
we're good to go ? :)

Regards
Tarek
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 29, 2009, 10:57 AM

Post #13 of 93 (1806 views)
Permalink
PEP 376 [In reply to]

Hello,

If no one objects, I'd like to push PEP 376 in the "accepted" status
and go ahead with its implementation,
with continuous feedback at Distutils-SIG as we did to build it.

The next PEPs that are being discussed at Distutils-SIG are :

- the new version of PEP 345 for the inclusion of fields like
"installed_requires" (dependencies)
- PEP 386, that talks about distribution version numbers (because it's
needed to describe dependencies)

While they are still under heavy discussion, I have good hope that
they will both make it for 2.7 and 3.2.

Regards
Tarek

--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Jun 29, 2009, 1:45 PM

Post #14 of 93 (1841 views)
Permalink
Re: PEP 376 [In reply to]

> If no one objects, I'd like to push PEP 376 in the "accepted" status
> and go ahead with its implementation,
> with continuous feedback at Distutils-SIG as we did to build it.

I think this isn't quite the process. In the past, every PEP required
BDFL pronouncement, which you should now seek.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ncoghlan at gmail

Jun 30, 2009, 5:32 AM

Post #15 of 93 (1786 views)
Permalink
Re: PEP 376 [In reply to]

Martin v. Löwis wrote:
>> If no one objects, I'd like to push PEP 376 in the "accepted" status
>> and go ahead with its implementation,
>> with continuous feedback at Distutils-SIG as we did to build it.
>
> I think this isn't quite the process. In the past, every PEP required
> BDFL pronouncement, which you should now seek.

Agreed. While Guido is highly likely to just accept the distutils-sig
consensus on something like this, that doesn't eliminate the need for
him to actually *say* that he is approving the PEP on that basis.

Cheers,
Nick.

--
Nick Coghlan | ncoghlan [at] gmail | Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 30, 2009, 5:38 AM

Post #16 of 93 (1786 views)
Permalink
Re: PEP 376 [In reply to]

On Tue, Jun 30, 2009 at 2:32 PM, Nick Coghlan<ncoghlan [at] gmail> wrote:
> Martin v. Löwis wrote:
>>> If no one objects, I'd like to push PEP 376 in the "accepted" status
>>> and go ahead with its implementation,
>>> with continuous feedback at Distutils-SIG as we did to build it.
>>
>> I think this isn't quite the process. In the past, every PEP required
>> BDFL pronouncement, which you should now seek.
>
> Agreed. While Guido is highly likely to just accept the distutils-sig
> consensus on something like this, that doesn't eliminate the need for
> him to actually *say* that he is approving the PEP on that basis.

Sure, I didn't want to bypass the process, I was not really sure about
the right move on this PEP
since it was based on the summit decisions,

I'll wait for Guido decision, thanks.

Cheers
Tarek

--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


guido at python

Jun 30, 2009, 10:21 AM

Post #17 of 93 (1774 views)
Permalink
Re: PEP 376 [In reply to]

On Tue, Jun 30, 2009 at 5:32 AM, Nick Coghlan<ncoghlan [at] gmail> wrote:
> Martin v. Löwis wrote:
>>> If no one objects, I'd like to push PEP 376 in the "accepted" status
>>> and go ahead with its implementation,
>>> with continuous feedback at Distutils-SIG as we did to build it.
>>
>> I think this isn't quite the process. In the past, every PEP required
>> BDFL pronouncement, which you should now seek.
>
> Agreed. While Guido is highly likely to just accept the distutils-sig
> consensus on something like this, that doesn't eliminate the need for
> him to actually *say* that he is approving the PEP on that basis.

Sure. :-)

So what *is* the distutils-sig consensus?

And is there consensus outside of it? (Remember the ipaddr debacle.
It's easy for people to miss an important PEP.)

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


pje at telecommunity

Jun 30, 2009, 10:44 AM

Post #18 of 93 (1782 views)
Permalink
Re: PEP 376 [In reply to]

At 07:57 PM 6/29/2009 +0200, Tarek Ziadé wrote:
>Hello,
>
>If no one objects, I'd like to push PEP 376 in the "accepted" status
>and go ahead with its implementation,
>with continuous feedback at Distutils-SIG as we did to build it.

I do have a question about the current draft... Do zipped
distributions use EGG-INFO or a project-version.egg-info? This isn't
spelled out in the PEP, although I get the general idea that the
EGG-INFO format isn't supported, and thus the PEP and API do not
support existing .egg files. This should probably be made clear, if
that's the intention.

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


p.f.moore at gmail

Jun 30, 2009, 11:37 AM

Post #19 of 93 (1778 views)
Permalink
Re: PEP 376 [In reply to]

2009/6/30 Guido van Rossum <guido [at] python>:
> And is there consensus outside of it? (Remember the ipaddr debacle.
> It's easy for people to miss an important PEP.)

My impression (as someone who does read the distutils SIG, but in all
honesty has very little practical interest in distutils internals):

- It's very focused on distutils internals. If it has an impact on end
users (as opposed to packagers), it's very hard to discern. The only
hint of such a thing is the mention of an uninstall function. But it's
only an API. So still no end user impact [1] :-(
- The terminology and focus feels setuptools-inspired (my apologies if
that's not the case). Expect pushback from setuptools haters...
- It's quite dense for the casual reader not familiar with the
terminology. I've never managed to read the whole thing through,
personally.

I'd suggest two things:
- Add a section to the PEP describing the purely end user impact of the changes
- Post that to python-list, with a note pointing to the PEP for people
who care about distutils details

If that gets no feedback, you've done as much as you can.

Paul.

[1] I'd actually like it if the PEP defined an uninstall command -
something like "python -m distutils.uninstall packagename". It can be
as minimalist as you like, but I'd like to see it present.
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Jun 30, 2009, 12:18 PM

Post #20 of 93 (1784 views)
Permalink
Re: PEP 376 [In reply to]

> - Post that to python-list, with a note pointing to the PEP for people
> who care about distutils details

If that hasn't been done before (I have not followed), it should be done
right away. PEP 1 makes it a mandatory requirement for acceptance.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 30, 2009, 12:19 PM

Post #21 of 93 (1774 views)
Permalink
Re: PEP 376 [In reply to]

2009/6/30 Guido van Rossum <guido [at] python>:
> On Tue, Jun 30, 2009 at 5:32 AM, Nick Coghlan<ncoghlan [at] gmail> wrote:
>> Martin v. Löwis wrote:
>>>> If no one objects, I'd like to push PEP 376 in the "accepted" status
>>>> and go ahead with its implementation,
>>>> with continuous feedback at Distutils-SIG as we did to build it.
>>>
>>> I think this isn't quite the process. In the past, every PEP required
>>> BDFL pronouncement, which you should now seek.
>>
>> Agreed. While Guido is highly likely to just accept the distutils-sig
>> consensus on something like this, that doesn't eliminate the need for
>> him to actually *say* that he is approving the PEP on that basis.
>
> Sure. :-)
>
> So what *is* the distutils-sig consensus?

The consensus is to have one and only one way to install distributions
in Python,
and a way to retrieve information on installed distributions, and their files.


>
> And is there consensus outside of it? (Remember the ipaddr debacle.
> It's easy for people to miss an important PEP.)

I am not sure who you are thinking about,

I am blogging a lot on the topic and I am trying to get key players
involved in this, like os packagers etc.

We've built this PEP in respect with existing tools like setuptools,
etc, and I am sending mails at python-dev
to make sure evereyone involved in python development has a chance to
provide some feedback,


>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>



--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 30, 2009, 12:28 PM

Post #22 of 93 (1776 views)
Permalink
Re: PEP 376 [In reply to]

On Tue, Jun 30, 2009 at 8:37 PM, Paul Moore<p.f.moore [at] gmail> wrote:
> - The terminology and focus feels setuptools-inspired (my apologies if
> that's not the case). Expect pushback from setuptools haters...

setuptools implemented *needed* features, like a way for developers to browse
installed packages.

We said during the summit at Pycon that we wanted this feature in
Distutils, (Guido said so)

So I worked in PEP 376 to introduce them.

Now if the fact that we want to introduce the good ideas of setuptools
into distutils,
(problems Phillip resolved) will make people push it back *even* they
are good idead, needed features,
is something we need to fight against.

> - It's quite dense for the casual reader not familiar with the
> terminology. I've never managed to read the whole thing through,
> personally.

I'll try to add a definitions section,

>
> I'd suggest two things:
> - Add a section to the PEP describing the purely end user impact of the changes
> - Post that to python-list, with a note pointing to the PEP for people
> who care about distutils details
>

Ok.

> If that gets no feedback, you've done as much as you can.

I hope it'll make it one day. If not, I don't understand the goal of
the "Python Language Summit'

>
> Paul.
>
> [1] I'd actually like it if the PEP defined an uninstall command -
> something like "python -m distutils.uninstall packagename". It can be
> as minimalist as you like, but I'd like to see it present.

it's already there:

http://www.python.org/dev/peps/pep-0376/#adding-an-uninstall-function


Regards
Tarek

--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


ziade.tarek at gmail

Jun 30, 2009, 12:35 PM

Post #23 of 93 (1778 views)
Permalink
Re: PEP 376 [In reply to]

2009/6/30 P.J. Eby <pje [at] telecommunity>:
> At 07:57 PM 6/29/2009 +0200, Tarek Ziadé wrote:
>>
>> Hello,
>>
>> If no one objects, I'd like to push PEP 376 in the "accepted" status
>> and go ahead with its implementation,
>> with continuous feedback at Distutils-SIG as we did to build it.
>
> I do have a question about the current draft...  Do zipped distributions use
> EGG-INFO or a project-version.egg-info?  This isn't spelled out in the PEP,
> although I get the general idea that the EGG-INFO format isn't supported,
> and thus the PEP and API do not support existing .egg files.  This should
> probably be made clear, if that's the intention.

The intention is to have only one standard for the egg-info, I have
explained it in this section:

http://www.python.org/dev/peps/pep-0376/#egg-info-becomes-a-directory

previous formats will not be supported but that won't break anything of course
since the new APIs will work only over the distribution installed with
the new version
of distutils.



>
>



--
Tarek Ziadé | http://ziade.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


martin at v

Jun 30, 2009, 12:49 PM

Post #24 of 93 (1772 views)
Permalink
Re: PEP 376 [In reply to]

Tarek Ziadé wrote:
> On Tue, Jun 30, 2009 at 8:37 PM, Paul Moore<p.f.moore [at] gmail> wrote:
>> - The terminology and focus feels setuptools-inspired (my apologies if
>> that's not the case). Expect pushback from setuptools haters...
>
> setuptools implemented *needed* features, like a way for developers to browse
> installed packages.

That doesn't imply that setuptools itself is needed. I can browse
installed packages with dpkg -l, or "add-and-remove programs".

> Now if the fact that we want to introduce the good ideas of setuptools
> into distutils,
> (problems Phillip resolved) will make people push it back *even* they
> are good idead, needed features,
> is something we need to fight against.

Assuming "we" have consensus before we start fighting against others.

FWIW, I abstain from commenting on PEP 376. I don't need it, but it
doesn't seem to hurt having it, especially since "egg-info" already
managed to sneak in.

> I hope it'll make it one day. If not, I don't understand the goal of
> the "Python Language Summit'

Just be patient. Both Python 2.7 and 3.2 are still many months ahead,
so there is no urgency (AFAICT).

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


Scott.Daniels at Acm

Jun 30, 2009, 1:06 PM

Post #25 of 93 (1770 views)
Permalink
Re: PEP 376 [In reply to]

Tarek Ziadé wrote:
> On Tue, Jun 30, 2009 at 8:37 PM, Paul Moore<p.f.moore [at] gmail> wrote:
>> [1] I'd actually like it if the PEP defined an uninstall command -
>> something like "python -m distutils.uninstall packagename". It can be
>> as minimalist as you like, but I'd like to see it present.
>
> it's already there:
>
> http://www.python.org/dev/peps/pep-0376/#adding-an-uninstall-function

That (at least as I read it) is a function, not a command.
If it is a command, give an example of its use from the command line
for us poor "don't want to research" people. If the following works:

$ python setup.py uninstall some_package

Then explicitly say so for us poor schlubs.

--Scott David Daniels
Scott.Daniels [at] Acm

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

First page Previous page 1 2 3 4 Next page Last page  View All Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.