jenkins-bot has submitted this change and it was merged.

Change subject: __all__ items must be bytes on Python 2
......................................................................


__all__ items must be bytes on Python 2

Bug: T111615
Change-Id: Iae8b41678723382ddad1bf1acdf3aed0d75a9413
(cherry picked from commit d8d368a8115319325728f1a32dc627ce3fe33186)
---
M pywikibot/__init__.py
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index b390191..c155035 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -98,6 +98,10 @@
 # so instead use this trick
 globals()['__all__'] = globals()['__all__'] + textlib_methods
 
+if sys.version_info[0] == 2:
+    # T111615: Python 2 requires __all__ is bytes
+    globals()['__all__'] = tuple(bytes(item) for item in __all__)
+
 for _name in textlib_methods:
     target = getattr(textlib, _name)
     wrapped_func = redirect_func(target)

-- 
To view, visit https://gerrit.wikimedia.org/r/243058
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae8b41678723382ddad1bf1acdf3aed0d75a9413
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to