
Hello! I have read the setuptools documentation and have tried out the parse_version comparison, and it turns out that the documentation says is just wrong. I am using version 0.6c8 of setuptools.
The documentation says, quoting: "Don't use - or any other character than . as a separator, unless you really want a post-release. Remember that 2.1-rc2 means you've already released 2.1, whereas 2.1rc2 and 2.1.c2 are candidates you're putting out before 2.1". It also shows a little example for that:
parse_version('2.1-rc2') < parse_version('2.1')
False
While this sounds pretty weird(how can a rc be after the release?) but also logical if you just consider any character but "." to be post-release, which you can do, but do not have to. Still if they say this is the rule it is okay, although I would not quite agree with that, as many people use underscores or dashes as a separation.
So what the real problem is, is that the documentation says things that are untrue with at least the latest version. As said before I have setuptools 0.6c8 and the behaviour is not like the documentation says in any way. Here is a little example:
parse_version("2.1-rc2") < parse_version("2.1")
True
Notice the difference? It's exactly the *opposite* of what the documentation says. I really ask you to correct this issue as it might confuse new users.
The documentation I mean can be found at http://peak.telecommunity.com/DevCenter/setuptools, if it is not done by you or you cannot edit it, I apologise and will send another email to its maintainer, but as I could not find out who maintains this site, I just assumed that you, as the maintainer of setuptools are maintaining the documentation.
Thanks in advance for your time reading this and correcting the documentation.
Best regards, Florian Mayer

At 06:33 PM 7/9/2008 +0200, Florian Mayer wrote:
Hello! I have read the setuptools documentation and have tried out the parse_version comparison, and it turns out that the documentation says is just wrong. I am using version 0.6c8 of setuptools.
The documentation says, quoting: "Don't use - or any other character than . as a separator, unless you really want a post-release. Remember that 2.1-rc2 means you've already released 2.1, whereas 2.1rc2 and 2.1.c2 are candidates you're putting out before 2.1". It also shows a little example for that:
parse_version('2.1-rc2') < parse_version('2.1')
False
While this sounds pretty weird(how can a rc be after the release?) but also logical if you just consider any character but "." to be post-release, which you can do, but do not have to. Still if they say this is the rule it is okay, although I would not quite agree with that, as many people use underscores or dashes as a separation.
So what the real problem is, is that the documentation says things that are untrue with at least the latest version. As said before I have setuptools 0.6c8 and the behaviour is not like the documentation says in any way. Here is a little example:
parse_version("2.1-rc2") < parse_version("2.1")
True
Notice the difference? It's exactly the *opposite* of what the documentation says. I really ask you to correct this issue as it might confuse new users.
The code is apparently correct here; the choice of example in the text is bad. Patches welcome.

-On [20080709 18:52], Phillip J. Eby (pje@telecommunity.com) wrote:
The code is apparently correct here; the choice of example in the text is bad. Patches welcome.
Not meant disrespectful Phillip, but who will apply the patches? It has been obvious that you have had very little time lately and there's already a few patches in the issue tracker waiting for some TLC.

At 06:56 PM 7/9/2008 +0200, Jeroen Ruigrok van der Werven wrote:
-On [20080709 18:52], Phillip J. Eby (pje@telecommunity.com) wrote:
The code is apparently correct here; the choice of example in the text is bad. Patches welcome.
Not meant disrespectful Phillip, but who will apply the patches? It has been obvious that you have had very little time lately and there's already a few patches in the issue tracker waiting for some TLC.
"lately" != "never again"
My time at OSAF will probably end in November, and my book project (@ thinkingthingsdone.com) will end sooner than that.
Doesn't mean I might not still be pretty busy, but I won't be two jobs worth of busy forever.

On Wed, Jul 9, 2008 at 8:06 PM, Phillip J. Eby pje@telecommunity.com wrote:
At 06:56 PM 7/9/2008 +0200, Jeroen Ruigrok van der Werven wrote:
-On [20080709 18:52], Phillip J. Eby (pje@telecommunity.com) wrote:
The code is apparently correct here; the choice of example in the text is bad. Patches welcome.
Not meant disrespectful Phillip, but who will apply the patches? It has been obvious that you have had very little time lately and there's already a few patches in the issue tracker waiting for some TLC.
"lately" != "never again"
My time at OSAF will probably end in November, and my book project (@ thinkingthingsdone.com) will end sooner than that.
Doesn't mean I might not still be pretty busy, but I won't be two jobs worth of busy forever.
You asked for some tests some time ago to reduce the amount of work for you to review other people patches, we did a sprint on the topic, and we were ready to continue this work, but were waiting for feedback.
I think a quick look on our brz branch would take less than 10 mn,
http://bazaar.launchpad.net/~setuptools/setuptools-test/main/files (all text files in setuptools/tests)
Just to say if it is the right direction. That would motivate us to continue our work until you can dedicate some time on setuptools project again.
Regards,
Tarek
participants (4)
-
Florian Mayer
-
Jeroen Ruigrok van der Werven
-
Phillip J. Eby
-
Tarek Ziadé