jenkins-bot has submitted this change and it was merged.
Change subject: Allow unicode usernames in headers ......................................................................
Allow unicode usernames in headers
Headers are bytes (with either an undefined encoding or latin-1, but that does not stop us from putting in data that's actually utf-8, as MW does with MySQL).
Bug: 69354 Change-Id: I062d16604a8b87b5d0c598d4936eca2ecb8303f2 --- M pywikibot/comms/http.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: Legoktm: Looks good to me, approved Eranroz: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 69789e1..5edbd62 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -158,10 +158,11 @@ username = site.username() if not username: username = "" + kwargs["headers"]["user-agent"] = config.USER_AGENT_FORMAT.format( script=pywikibot.calledModuleName(), version=pywikibot.version.getversiondict()['rev'], - username=quote(username), + username=quote(username.encode('utf-8')), lang=site.code, family=site.family.name) else:
pywikibot-commits@lists.wikimedia.org