Re: Odd version scheme

2015-02-12 Thread Ian Kelly
On Thu, Feb 12, 2015 at 11:58 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 2015-02-12 17:35, Ian Kelly wrote: On Thu, Feb 12, 2015 at 10:19 AM, Skip Montanaro skip.montan...@gmail.com wrote: I believe this sort of lexicographical comparison wart is one of the reasons the Python-dev gang

Re: Odd version scheme

2015-02-12 Thread Mark Lawrence
On 12/02/2015 19:16, Ian Kelly wrote: On Thu, Feb 12, 2015 at 11:58 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 2015-02-12 17:35, Ian Kelly wrote: On Thu, Feb 12, 2015 at 10:19 AM, Skip Montanaro skip.montan...@gmail.com wrote: I believe this sort of lexicographical comparison wart is one

Re: Odd version scheme

2015-02-12 Thread MRAB
On 2015-02-12 17:35, Ian Kelly wrote: On Thu, Feb 12, 2015 at 10:19 AM, Skip Montanaro skip.montan...@gmail.com wrote: I believe this sort of lexicographical comparison wart is one of the reasons the Python-dev gang decided that there would be no micro versions 9. There are too many similar

Re: Odd version scheme

2015-02-12 Thread Tim Chase
On 2015-02-12 12:16, Ian Kelly wrote: It still becomes an issue when we get to Python 10. Just call it Python X! :-) Things break down again when we get to Python XIX. 'XVIII' 'XIX' False You know what this sub-thread gives me? The icks. https://www.youtube.com/watch?v=6DzfPcSysAg

Re: Odd version scheme

2015-02-12 Thread Emile van Sebille
On 2/12/2015 11:16 AM, Ian Kelly wrote: Things break down again when we get to Python XIX. 'XVIII' 'XIX' False Looks to me like you better check if your PEP313 patch is installed properly. :) Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Parsing and comparing version strings (was: Odd version scheme)

2015-02-12 Thread Tim Chase
On 2015-02-13 12:20, Ben Finney wrote: Not sure why this is ridiculous. Right, versions are effectively a special type [0], specifically *because* they intentionally don't compare as scalar numbers or strings. It's not “ridiculous” to need custom comparisons when that's the case. Python

Parsing and comparing version strings (was: Odd version scheme)

2015-02-12 Thread Ben Finney
Gisle Vanem gva...@yahoo.no writes: That's exactly what they do now in IPython/utils/version.py with the comment: Utilities for version comparison It is a bit ridiculous that we need these. Not sure why this is ridiculous. Right, versions are effectively a special type [0],

Re: Odd version scheme

2015-02-12 Thread Steven D'Aprano
Skip Montanaro wrote: I believe this sort of lexicographical comparison wart is one of the reasons the Python-dev gang decided that there would be no micro versions 9. There are too many similar assumptions about version numbers out in the real world. Which is why there will be no Windows

Re: Odd version scheme

2015-02-12 Thread Tim Chase
'4.7': raise ImportError(IPython requires PyQt4 = 4.7, found %s%QtCore.PYQT_VERSION_STR) So even if '4.10' '4.7', my '4.10' is newer. What odd version scheme is this really? I just edited that line to read: if QtCore.PYQT_VERSION_STR '4.10':' This looks like it's comparing them as strings

Re: Odd version scheme

2015-02-12 Thread Skip Montanaro
I believe this sort of lexicographical comparison wart is one of the reasons the Python-dev gang decided that there would be no micro versions 9. There are too many similar assumptions about version numbers out in the real world. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Odd version scheme

2015-02-12 Thread Ian Kelly
): if QtCore.PYQT_VERSION_STR '4.7': raise ImportError(IPython requires PyQt4 = 4.7, found %s%QtCore.PYQT_VERSION_STR) So even if '4.10' '4.7', my '4.10' is newer. What odd version scheme is this really? I just edited that line to read: if QtCore.PYQT_VERSION_STR '4.10': Seems

Re: Odd version scheme

2015-02-12 Thread Chris Angelico
'4.10' is newer. What odd version scheme is this really? I just edited that line to read: if QtCore.PYQT_VERSION_STR '4.10': Looks to me like a fault in comparison format. Normally, you'd expect that 4.10 follows 4.9 - that is, that the version number is a tuple of integers

Odd version scheme

2015-02-12 Thread Gisle Vanem
PyQt4 = 4.7, found %s%QtCore.PYQT_VERSION_STR) So even if '4.10' '4.7', my '4.10' is newer. What odd version scheme is this really? I just edited that line to read: if QtCore.PYQT_VERSION_STR '4.10': Seems to be working fine now. -- --gv -- https://mail.python.org/mailman/listinfo/python-list

Re: Odd version scheme

2015-02-12 Thread Chris Angelico
On Fri, Feb 13, 2015 at 4:19 AM, Skip Montanaro skip.montan...@gmail.com wrote: I believe this sort of lexicographical comparison wart is one of the reasons the Python-dev gang decided that there would be no micro versions 9. There are too many similar assumptions about version numbers out in

Re: Odd version scheme

2015-02-12 Thread Ian Kelly
On Thu, Feb 12, 2015 at 10:19 AM, Skip Montanaro skip.montan...@gmail.com wrote: I believe this sort of lexicographical comparison wart is one of the reasons the Python-dev gang decided that there would be no micro versions 9. There are too many similar assumptions about version numbers out in

Re: Odd version scheme

2015-02-12 Thread Gisle Vanem
Tim Chase wrote: So the test should actually be something like if LooseVersion(QtCore.PYQT_VERSION_STR) LooseVersion(4.10): balk() That's exactly what they do now in IPython/utils/version.py with the comment: Utilities for version comparison It is a bit ridiculous that we need

Re: Odd version scheme

2015-02-12 Thread Tim Chase
On 2015-02-12 18:37, Gisle Vanem wrote: Tim Chase wrote: So the test should actually be something like if LooseVersion(QtCore.PYQT_VERSION_STR) LooseVersion(4.10): balk() That's exactly what they do now in IPython/utils/version.py with the comment: Utilities for version