Re: [Python-Dev] version compare function into main lib

2009-03-28 Thread Mart Sõmermaa
On Sat, Mar 28, 2009 at 12:37 AM, Ben Finney < bignose+hates-s...@benfinney.id.au >wrote: > "Martin v. Löwis" writes: > > > I don't mind the setuptools implementation being used as a basis > > (assuming it gets contributed), but *independently* I think a > > specfication is needed what version st

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Ben Finney
"Martin v. Löwis" writes: > I don't mind the setuptools implementation being used as a basis > (assuming it gets contributed), but *independently* I think a > specfication is needed what version strings it actually understands. > Such specification must precede the actual implementation (in > dis

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Eric Smith
Martin v. Löwis wrote: I got the impression that people are generally happy with what setuptools provides for version parsing and comparison. Does anyone think that's not a good model? Procedurally, I think it's a very bad approach. I don't mind the setuptools implementation being used as a

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Martin v. Löwis
I got the impression that people are generally happy with what setuptools provides for version parsing and comparison. Does anyone think that's not a good model? Procedurally, I think it's a very bad approach. I don't mind the setuptools implementation being used as a basis (assuming it gets

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread P.J. Eby
At 05:08 PM 3/27/2009 +0100, M.-A. Lemburg wrote: On 2009-03-27 17:01, Eric Smith wrote: > Martin v. Löwis wrote: >>> Correct me if I wrong, but shouldn't Python include function for >>> version comparisons? >> >> On the packaging summit yesterday, people agreed that yes, we should >> have someth

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Eric Smith
Mart Sõmermaa wrote: Instead of trying to parse some version string, distutils should require defining the version as tuple with well-defined entries - much like what we have in sys.version_info for Python. The developer can then still use whatever string format s/he wants.

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Mart Sõmermaa
> Instead of trying to parse some version string, distutils should > require defining the version as tuple with well-defined entries - > much like what we have in sys.version_info for Python. > > The developer can then still use whatever string format s/he wants. > > The version compare function wo

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread M.-A. Lemburg
On 2009-03-27 17:01, Eric Smith wrote: > Martin v. Löwis wrote: >>> Correct me if I wrong, but shouldn't Python include function for >>> version comparisons? >> >> On the packaging summit yesterday, people agreed that yes, we should >> have something like that in the standard library, and it should

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Eric Smith
Martin v. Löwis wrote: Correct me if I wrong, but shouldn't Python include function for version comparisons? On the packaging summit yesterday, people agreed that yes, we should have something like that in the standard library, and it should be more powerful than what distutils currently offers

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Mart Sõmermaa
See http://wiki.python.org/moin/ApplicationInfrastructure , "Version handling" below for a possible strict version API. The page is relevant for the general packaging discussion as well, although it's not fully fleshed out yet. MS On Fri, Mar 27, 2009 at 5:11 PM, "Martin v. Löwis" wrote: > Corr

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Martin v. Löwis
Correct me if I wrong, but shouldn't Python include function for version comparisons? On the packaging summit yesterday, people agreed that yes, we should have something like that in the standard library, and it should be more powerful than what distutils currently offers. There was no conclusi

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Greg Ewing
anatoly techtonik wrote: Correct me if I wrong, but shouldn't Python include function for version comparisons? Can't you just compare sys.version_info tuples? >>> sys.version_info (2, 5, 0, 'final', 0) Assuming the other possibilities for 'final' are 'alpha' and 'beta', these should compare

Re: [Python-Dev] version compare function into main lib

2009-03-27 Thread Eric Smith
anatoly techtonik wrote: Correct me if I wrong, but shouldn't Python include function for version comparisons? What do you think about adding cmpversions(first, second, strict=false) based on distutils into main lib? distutils _is_ already in the "main lib", that is, the standard library.

[Python-Dev] version compare function into main lib

2009-03-27 Thread anatoly techtonik
Greetings, Correct me if I wrong, but shouldn't Python include function for version comparisons? The problem of splitting a string like "10.3.40-beta" into tuple for cmp() seems to be dead simple, but the code gets bulky with excepting errors arised from converting resulting strings for arithmeti