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)