John Vandenberg has uploaded a new change for review. https://gerrit.wikimedia.org/r/203524
Change subject: Restore Page.__repr__ to pre-unicode_literals behaviour ...................................................................... Restore Page.__repr__ to pre-unicode_literals behaviour 1e54a7d introduce unicode_literals, but altered the output of Page.__repr__. Prior to that change, Page.__repr__ in py2 emitted non-ascii encoded using config.console_encoding so it would display correctly in the console, and the logging layer would then recode it to the required encoding. Change-Id: I7da9ba18fcdfa31c6f78db68179a4c953bc649a7 --- M pywikibot/page.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/24/203524/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 4e29b24..bd9bb8a 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -273,8 +273,8 @@ def __repr__(self): """Return a more complete string representation.""" - title = self.title().encode(config.console_encoding).decode('unicode-escape') - return '{0}({1})'.format(self.__class__.__name__, title) + title = self.title().encode(config.console_encoding) + return str('{0}({1})').format(self.__class__.__name__, title) def _cmpkey(self): """ -- To view, visit https://gerrit.wikimedia.org/r/203524 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7da9ba18fcdfa31c6f78db68179a4c953bc649a7 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: John Vandenberg <jay...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits