[issue14894] distutils.LooseVersion fails to compare number and a word

2021-02-03 Thread Steve Dower
Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If y

[issue14894] distutils.LooseVersion fails to compare number and a word

2018-10-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you want to make LooseVersion a tiny bit more robust, I suggest to borrow the algorithm from the platform module (see issue26544). -- nosy: +serhiy.storchaka ___ Python tracker

[issue14894] distutils.LooseVersion fails to compare number and a word

2018-10-19 Thread Éric Araujo
Éric Araujo added the comment: I am inclined to reject the patch. LooseVersion is not meant to be a general utility for all modules; I know it’s used in the wild but projects should define their parsing/comparison function or make up a specific module for that. If the problem happens from di

[issue14894] distutils.LooseVersion fails to compare number and a word

2018-10-19 Thread YP
YP added the comment: Hi, Just wanted to know if there was anything new on this? When managing softwares version we often are not at all master of the naming convention used: we just have to deal with it. "LooseVersion" was very nice as it would take any string as input and do "the best" wi

[issue14894] distutils.LooseVersion fails to compare number and a word

2015-01-30 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: eric.araujo -> versions: +Python 3.5 -Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-

[issue14894] distutils.LooseVersion fails to compare number and a word

2014-03-13 Thread Nick Coghlan
Nick Coghlan added the comment: Yes, I agree we should allow backwards compatible distutils RFEs if people want to work on them. It's not going away any time soon, we just need to be careful with any internal refactoring. -- ___ Python tracker

[issue14894] distutils.LooseVersion fails to compare number and a word

2014-03-13 Thread Éric Araujo
Éric Araujo added the comment: Forgot one: * Can we add tar.xz support to sdist? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue14894] distutils.LooseVersion fails to compare number and a word

2014-03-13 Thread Éric Araujo
Éric Araujo added the comment: > Unfortunately, the current likely answer re updating vanilla distutils to > handle the new > standards is "we won't". The backwards compatibility issues involved are just > too hairy > for us to start enabling by default in the standard library, and I've become

[issue14894] distutils.LooseVersion fails to compare number and a word

2014-03-12 Thread Nick Coghlan
Nick Coghlan added the comment: Unfortunately, the current likely answer re updating vanilla distutils to handle the new standards is "we won't". The backwards compatibility issues involved are just too hairy for us to start enabling by default in the standard library, and I've become convince

[issue14894] distutils.LooseVersion fails to compare number and a word

2014-03-12 Thread Éric Araujo
Éric Araujo added the comment: I’m still torn between improving this as best as we can and waiting for clean new spec and code. Last PyCon Nick said he had a PEP in mind to specify how distutils would be updated to support new standards; I think we’ll revisit this issue when that policy exist

[issue14894] distutils.LooseVersion fails to compare number and a word

2013-09-12 Thread Sam Lai
Sam Lai added the comment: I have a more realistic example of this bug. In the docstring for distutils.LooseVersion, it says '1.5.1' and '3.2.p10' are both valid version numbers. If instead of '3.2.p10', we use '1.5.p10', the following occurs - >>> v1 = LooseVersion('1.5.1') >>> v2 = LooseVers

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-14 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-10 Thread Éric Araujo
Éric Araujo added the comment: I was replying to Dwayne. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or, rather, who :-S -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Don’t know if you’ve seen my previous message: I'm a bit lost, how are you replying to? :) -- ___ Python tracker ___

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-10 Thread Éric Araujo
Éric Araujo added the comment: Don’t know if you’ve seen my previous message: I think that most tools (e.g. setuptools) generate things like 1.0.2+gitab25c6fe95ee92fac3187dcd90e0560ccacb084a i.e. real version set by maintainer + hash, not just the hash. I was talking about a version number se

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As far as a real-world example is concerned, if you're using > git-describe to generate your version numbers, you can pretty easily > end up with something like "ab25c6fe95ee92fac3187dcd90e0560ccacb084a". And how are you supposed to compare that with anything

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-10 Thread Dwayne Litzenberger
Dwayne Litzenberger added the comment: "git describe --tags --always" will return a bare commit id if there is no previous tag. This is pretty common to have when you're working on a new package that hasn't been released yet: $ git init Initialized empty Git repository in /tmp/repo/.git/ $ to

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-12-08 Thread Éric Araujo
Éric Araujo added the comment: Thanks Dwayne. I think that most tools (e.g. setuptools) generate things like 1.0.2+gitab25c6fe95ee92fac3187dcd90e0560ccacb084a i.e. real version set by maintainer + hash, not just the hash, so I am still not convinced a change is needed. -- stage: need

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-10-31 Thread Dwayne Litzenberger
Dwayne Litzenberger added the comment: As far as a real-world example is concerned, if you're using git-describe to generate your version numbers, you can pretty easily end up with something like "ab25c6fe95ee92fac3187dcd90e0560ccacb084a". -- nosy: +DLitz _

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-06-24 Thread Éric Araujo
Éric Araujo added the comment: > I think the comparison should continue to succeed, > with whatever results it produces in Python 2.7 The point I was trying to make is that this is not something done on purpose, nor useful or guaranteed, but only a side effect of 2.x’s mixed comparisons. As u

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-06-03 Thread Natalia
Changes by Natalia : Removed file: http://bugs.python.org/file25807/14894.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-06-03 Thread Natalia
Natalia added the comment: I had a wrong return value in one of unit tests, fixed. -- Added file: http://bugs.python.org/file25808/14894.patch ___ Python tracker ___ ___

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-06-03 Thread Natalia
Natalia added the comment: Hi, I'm attaching a patch that fixes this issue:) -- keywords: +patch Added file: http://bugs.python.org/file25807/14894.patch ___ Python tracker ___

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 24, 2012, at 03:03 PM, Éric Araujo wrote: >> But if 'a' is invalid, then LooseVersion should refuse to accept it in its >> constructor, right? >It’s complicated. The doc does not say much, the docstring however clearly >states that versions should sta

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Éric Araujo
Éric Araujo added the comment: About Barry’s reply: > But if 'a' is invalid, then LooseVersion should refuse to accept it in its > constructor, right? It’s complicated. The doc does not say much, the docstring however clearly states that versions should start with a digit, but a ton of proje

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Éric Araujo
Éric Araujo added the comment: > Hello, as a GSoC student, I'm working on PyPI to Debian repository converter. Great! I hope you’re aware of previous efforts like stdeb (unfortunately requires setuptools) and py2rpm (for rpm systems but some parts can be inspiration, like the download code).

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Natalia
Natalia added the comment: Hello, as a GSoC student, I'm working on PyPI to Debian repository converter. I wanted to compare  versions of packages available in PyPI and it broke while comparing appwsgi, wsgi-design ('default') and gar ('prototype.1') versions. --

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 23, 2012, at 10:13 PM, Éric Araujo wrote: > >Thanks for the report. How did you find this? According to the doc of >LooseVersion, 'a' is not valid, so I would like a real example to accept this >as a bug. It works in Python 2.7 so I think it was view

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. How did you find this? According to the doc of LooseVersion, 'a' is not valid, so I would like a real example to accept this as a bug. -- ___ Python tracker

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> needs patch versions: +Python 3.3 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list ma

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Piotr Ożarowski
Changes by Piotr Ożarowski : -- nosy: +piotr ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Natalia
New submission from Natalia : $ python2.7 -c 'from distutils.version import LooseVersion as V; print V("a") > V("1")' True $ python3.2 -c 'from distutils.version import LooseVersion as V; print(V("a") > V("b"))' False $ python3.2 -c 'from distutils.version import LooseVersion as V; print(V("a")