AccessToken.from_string() crashes on python3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Fix Released
|
Undecided
|
Unassigned | ||
python-launchpadlib (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Dimitri John Ledkov |
Bug Description
[Impact]
* Unable to renew/relogin with a new oauth token, using python3 scripts
* python2 APIs work (because python2 does not care about str vs bytes)
[Test Case]
* Attempt login_with() using python3 and an expired/invalid existing token
* Relogin should be successful, without crashing scripts
[Regression Potential]
* No change in behaviour on python2 (which is what used by reverse dependencies)
* this is a backport to fix python3 behaviour, for all the newly ported maintainance scripts in python3 that prefer to run on "stable" systems
[Other Info]
* Well tested in later releases, and with users running from trunk.
* I believe this still is not published in the cheeseshop.
[Original bug report]
Trying to use Launchpad.
Traceback (most recent call last):
File "./foo.py", line 31, in <module>
lb = launchpad.
File "/usr/lib/
shim_
File "/usr/lib/
representation = self._root.
File "/usr/lib/
response, content = self._request(url, extra_headers=
File "/usr/lib/
str(url), method=method, body=data, headers=headers)
File "/usr/lib/
url, method=method, body=body, headers=headers)
File "/usr/lib/
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/
return self.retry_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.web_root)
File "/usr/lib/
self.
File "/usr/lib/
key = params[
KeyError: 'oauth_token'
The problem is that params has b'oauth_token', not 'oauth_token', which matters on python3
Related branches
- Colin Watson (community): Needs Fixing
-
Diff: 15 lines (+5/-0)1 file modifiedsrc/launchpadlib/credentials.py (+5/-0)
- Zygmunt Krynicki: Pending requested
- LAZR Developers: Pending requested
-
Diff: 12 lines (+2/-0)1 file modifiedsrc/launchpadlib/credentials.py (+2/-0)
Changed in python-launchpadlib (Ubuntu): | |
status: | New → Fix Committed |
Changed in launchpadlib: | |
status: | New → Fix Committed |
no longer affects: | python-launchpadlib (Ubuntu Yakkety) |
Changed in python-launchpadlib (Ubuntu Xenial): | |
milestone: | none → ubuntu-16.04.2 |
assignee: | nobody → Dimitri John Ledkov (xnox) |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in python-launchpadlib (Ubuntu Xenial): | |
status: | Triaged → In Progress |
description: | updated |
This bug was fixed in the package python-launchpadlib - 1.10.4-1
---------------
python-launchpadlib (1.10.4-1) unstable; urgency=medium
[ Ondřej Nový ]
* Fixed VCS URL (https)
[ Dimitri John Ledkov ]
* New upstream release
* Drop deprecated warnings patch, applied upstream
* Cherrypick upstream patch to fix LP: #1471927
-- Dimitri John Ledkov <email address hidden> Sat, 13 Aug 2016 04:18:24 +0100