jenkins-bot merged this change.
[cleanup] Remove disfunctional versionnumber
- versionnumber is deprecated for 5 years and disfunctional.
It returns 34 instead of 35 for the current release but
would return 1023 for a mw '2.23.4-wmf.5' which is weird.
It was introduced in compat to compare versions as an int.
Change-Id: Iaec5b758883285f0c37542f6b23ac6982225187e
---
M pywikibot/family.py
1 file changed, 0 insertions(+), 17 deletions(-)
diff --git a/pywikibot/family.py b/pywikibot/family.py
index bea8eaf..ab6f83e 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1369,23 +1369,6 @@
"""
return None
- @deprecated('APISite.version()', since='20141225')
- def versionnumber(self, code):
- """DEPRECATED, use version() instead.
-
- Use L{pywikibot.site.mw_version} to compare version strings.
- Return an int identifying MediaWiki version.
-
- Currently this is implemented as returning the minor version
- number; i.e., 'X' in version '1.X.Y'
- """
- R = re.compile(r'(\d+).(\d+)')
- M = R.search(self.version(code))
- if not M:
- # Version string malformatted; assume it should have been 1.10
- return 10
- return 1000 * int(M.group(1)) + int(M.group(2)) - 1000
-
def encoding(self, code):
"""Return the encoding for a specific language wiki."""
return 'utf-8'
To view, visit change 584907. To unsubscribe, or for help writing mail filters, visit settings.