From ab1ae261baf1d5ea71c805e2240f3463430cb80f 2013-01-27 23:48:24 From: MinRK Date: 2013-01-27 23:48:24 Subject: [PATCH] remove unused NumericalVersion --- diff --git a/IPython/utils/version.py b/IPython/utils/version.py index 01b42c9..1de0047 100644 --- a/IPython/utils/version.py +++ b/IPython/utils/version.py @@ -22,39 +22,6 @@ from distutils.version import LooseVersion # Code #----------------------------------------------------------------------------- -class NumericalVersion(LooseVersion): - """A version of LooseVersion that is *always* comparable - - String elements (of any kind!) are interpreted as infinite. - Since these are generally only on development branches, - that is fairly safe, even though technically 1.0a1 should be less than 1.0. - """ - def parse (self, vstring): - # I've given up on thinking I can reconstruct the version string - # from the parsed tuple -- so I just store the string here for - # use by __str__ - self.vstring = vstring - components = filter(lambda x: x and x != '.', - self.component_re.split(vstring)) - for i in range(len(components)): - try: - components[i] = int(components[i]) - except ValueError: - # this is the only change - components[i] = float('inf') - - self.version = components - -def version_tuple(vs): - """Return a tuple of numbers from a version string. - - 'dev' 'a', 'etc' are transformed to float('inf'), - so they will always compare positively to any - regular integer element. - """ - return tuple(NumericalVersion(vs).version) - -# def check_version(v, check): """check version string v >= check @@ -66,4 +33,4 @@ def check_version(v, check): return LooseVersion(v) >= LooseVersion(check) except TypeError: return True - \ No newline at end of file +