jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/525208 )
Change subject: [cleanup] Python 3.4 is the lowest supported Python 3 release
......................................................................
[cleanup] Python 3.4 is the lowest supported Python 3 release
Due to Python 3.4 is the lowest supported Python 3 release
it is unnecessary to compare against PYTHON_VERSION < (3, 4).
We can just use PY2 instead
Change-Id: I480cf8832ebc3445b7f97bc1c67131365f263394
---
M pywikibot/site_detect.py
M pywikibot/version.py
2 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site_detect.py b/pywikibot/site_detect.py
index 8f40155..09b3be4 100644
--- a/pywikibot/site_detect.py
+++ b/pywikibot/site_detect.py
@@ -17,7 +17,7 @@
from pywikibot.comms.http import fetch
from pywikibot import config
from pywikibot.exceptions import ServerError
-from pywikibot.tools import MediaWikiVersion, PY2, PYTHON_VERSION
+from pywikibot.tools import MediaWikiVersion, PY2
if not PY2:
from html.parser import HTMLParser
@@ -230,7 +230,7 @@
def __init__(self, url):
"""Initializer."""
- if PYTHON_VERSION < (3, 4):
+ if PY2:
HTMLParser.__init__(self)
else:
super().__init__(convert_charrefs=True)
diff --git a/pywikibot/version.py b/pywikibot/version.py
index a2af1aa..f9ff714 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -44,7 +44,7 @@
import pywikibot
from pywikibot import config2 as config
-from pywikibot.tools import deprecated, PY2, PYTHON_VERSION, UnicodeType
+from pywikibot.tools import deprecated, PY2, UnicodeType
cache = None
_logger = 'version'
@@ -463,7 +463,7 @@
"""
if hasattr(module, '__file__') and os.path.exists(module.__file__):
filename = module.__file__
- if PYTHON_VERSION < (3, 4):
+ if PY2:
filename = os.path.abspath(filename)
if filename[-4:-1] == '.py' and os.path.exists(filename[:-1]):
filename = filename[:-1]
--
To view, visit https://gerrit.wikimedia.org/r/525208
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I480cf8832ebc3445b7f97bc1c67131365f263394
Gerrit-Change-Number: 525208
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits