1

Closed

sys.version_info < tuple doesn't work like CPython

description

In the Trac installer it has the following code which works in CPython, but not IronPython
 
min_python = (2,4)
 
if sys.version_info < min_python:
print "Trac requires Python %d.%d or later" % min_python
 
This evaluates to False on IronPython and True on CPython
 
CPython:
 
import sys
min_python = (2,4)
if sys.version_info < min_python:
... print "You fail"
...

 
 
IronPython:
 
IronPython 2.7.2 (2.7.0.40) on .NET 4.0.30319.17020 (64-bit)
Type "help", "copyright", "credits" or "license" for more information.
import sys
min_python = (2,4)
if sys.version_info < min_python:
... print "You fail"
...
You fail
Closed Mar 13, 2012 at 7:02 AM by slide_o_mix
Verified as fixed in 2.7.2.1

comments

jdhardy wrote Mar 13, 2012 at 6:36 AM

This was introduced in f8cce37 and fixed in 4a76497. Whoops.

wrote Mar 13, 2012 at 7:02 AM

wrote Feb 22, 2013 at 1:09 AM

wrote May 16, 2013 at 12:03 PM