Build Update for wikimedia/pywikibot-core -------------------------------------
Build: #2512 Status: Broken
Duration: 23 minutes and 50 seconds Commit: c7a12b5 (2.0) Author: xqt Message: [bugfix] Workaround UnicodeDecodeError on api error
When an API error happens it tries to log the parameters but it fails as they are in a dict and the str and repr of a dict use the repr of each key and value. If the value is then a Page instance it gets in Python 2 bytes returned encoded with the console encoding. If then the str or repr of the dict is inserted into a unicode it must decode the bytes and uses by default ASCII which fails if the Page's title contains non-ASCII characters.
This patch works around that by manually decoding the bytes in Python 2 using the console encoding whenever an API error happens but does not actually fix Page's repr method so it might still fail at other places. It assumes that the rest of the str is either also encoded using that or is encoded using ASCII and that the console encoding is a superset of ASCII.
Conflicts: pywikibot/data/api.py tests/api_tests.py
Bug: T66958 Change-Id: I298b7594599dd189211a8c268c7e094d042f40e6
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/d7212495a69d...c7a12b5eb...
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/70280077
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
pywikibot-commits@lists.wikimedia.org