https://bugzilla.wikimedia.org/show_bug.cgi?id=65156
Bug ID: 65156
Summary: Switch to more sensible version comparison
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: [email protected]
Reporter: [email protected]
Web browser: ---
Mobile Platform: ---
family.versionnumber now uses a regex:
R = re.compile(r"(\d+).(\d+)")
M = R.search(self.version(code))
and then returns the following:
return 1000 * int(M.group(1)) + int(M.group(2)) - 1000
so 1.10 is 10, 1.21 is 21, and 2.15 is 1015 (?!).
We should probably either use "from distutils.version import StrictVersion" or
parse the version in a (major, minor, sub) tuple.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l