jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/525285 )

Change subject: Revert "[bugfix] T113120 is solved for Python 3.5+"
......................................................................

Revert "[bugfix] T113120 is solved for Python 3.5+"

This reverts change I20a42ca67ab9d9692b6bcb22e33ab740a76f03cc

Bug: T113120
Bug: T228841
Change-Id: I1c15b9e84d9a7b71a082bb6e59acdca1bf95c60c
---
M pywikibot/data/api.py
1 file changed, 10 insertions(+), 8 deletions(-)

Approvals:
  Dalba: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 09d0648..17f5a05 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -43,9 +43,15 @@
 )
 from pywikibot.tools.formatter import color_format

-if PYTHON_VERSION[:2] == (3, 4):  # T113120
-    # Subclassing necessary to fix a bug of the email package
-    # in Python 3.4: see http://bugs.python.org/issue19003
+if not PY2:
+    from urllib.parse import urlencode, unquote
+
+    # Bug: T113120, T228841
+    # Subclassing necessary to fix bug of the email package in Python 3:
+    # see https://bugs.python.org/issue19003
+    # see https://bugs.python.org/issue18886
+    # The following solution might be removed if the bug is fixed for
+    # Python versions which are supported by PWB.

     from email.generator import BytesGenerator
     from email.mime.multipart import MIMEMultipart as MIMEMultipartOrig
@@ -80,12 +86,8 @@

     MIMEMultipart = CTEBinaryMIMEMultipart
 else:
-    from email.mime.multipart import MIMEMultipart
-
-if not PY2:
-    from urllib.parse import urlencode, unquote
-else:
     from urllib import urlencode, unquote
+    from email.mime.multipart import MIMEMultipart

 _logger = 'data.api'


--
To view, visit https://gerrit.wikimedia.org/r/525285
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: I1c15b9e84d9a7b71a082bb6e59acdca1bf95c60c
Gerrit-Change-Number: 525285
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

Reply via email to