Activity log for bug #1471927

Date Who What changed Old value New value Message
2015-07-06 18:26:13 Zygmunt Krynicki bug added bug
2015-07-06 18:32:09 Zygmunt Krynicki branch linked lp:~zyga/launchpadlib/fix-1471927
2015-07-11 19:07:09 Launchpad Janitor branch linked lp:~xnox/launchpadlib/fix-1471927
2016-06-16 14:10:32 Ben Romer bug added subscriber Ben Romer
2016-08-13 03:03:47 Dimitri John Ledkov bug task added python-launchpadlib (Ubuntu)
2016-08-13 03:22:44 Dimitri John Ledkov python-launchpadlib (Ubuntu): status New Fix Committed
2016-08-13 03:22:47 Dimitri John Ledkov launchpadlib: status New Fix Committed
2016-08-13 13:13:29 Launchpad Janitor python-launchpadlib (Ubuntu): status Fix Committed Fix Released
2016-12-21 23:29:59 Dimitri John Ledkov nominated for series Ubuntu Yakkety
2016-12-21 23:29:59 Dimitri John Ledkov bug task added python-launchpadlib (Ubuntu Yakkety)
2016-12-21 23:29:59 Dimitri John Ledkov nominated for series Ubuntu Xenial
2016-12-21 23:29:59 Dimitri John Ledkov bug task added python-launchpadlib (Ubuntu Xenial)
2016-12-21 23:30:28 Dimitri John Ledkov bug task deleted python-launchpadlib (Ubuntu Yakkety)
2016-12-21 23:30:48 Dimitri John Ledkov python-launchpadlib (Ubuntu Xenial): milestone ubuntu-16.04.2
2016-12-21 23:30:50 Dimitri John Ledkov python-launchpadlib (Ubuntu Xenial): assignee Dimitri John Ledkov (xnox)
2016-12-21 23:30:53 Dimitri John Ledkov python-launchpadlib (Ubuntu Xenial): importance Undecided Medium
2016-12-21 23:30:55 Dimitri John Ledkov python-launchpadlib (Ubuntu Xenial): status New Triaged
2016-12-22 15:12:32 Dimitri John Ledkov python-launchpadlib (Ubuntu Xenial): status Triaged In Progress
2017-01-06 15:17:10 Dimitri John Ledkov description Trying to use Launchpad.login_with() on python3, after fixing the earlier bug yields this issue: Traceback (most recent call last): File "./foo.py", line 31, in <module> lb = launchpad.projects[project] File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 1001, in __getitem__ shim_resource._ensure_representation() File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 382, in _ensure_representation representation = self._root._browser.get(self._wadl_resource) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 436, in get response, content = self._request(url, extra_headers=headers) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 387, in _request str(url), method=method, body=data, headers=headers) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 357, in _request_and_retry url, method=method, body=body, headers=headers) File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1291, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 132, in _request return self.retry_on_bad_token(response, content, *args) File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 144, in retry_on_bad_token self.launchpad.credentials, self.launchpad.credential_store) File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 545, in __call__ self.make_end_user_authorize_token(credentials, request_token_string) File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 658, in make_end_user_authorize_token self.web_root) File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 233, in exchange_request_token_for_access_token self.access_token = AccessToken.from_string(content) File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 251, in from_string key = params['oauth_token'] KeyError: 'oauth_token' The problem is that params has b'oauth_token', not 'oauth_token', which matters on python3 [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.login_with() on python3, after fixing the earlier bug yields this issue: Traceback (most recent call last):   File "./foo.py", line 31, in <module>     lb = launchpad.projects[project]   File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 1001, in __getitem__     shim_resource._ensure_representation()   File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 382, in _ensure_representation     representation = self._root._browser.get(self._wadl_resource)   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 436, in get     response, content = self._request(url, extra_headers=headers)   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 387, in _request     str(url), method=method, body=data, headers=headers)   File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 357, in _request_and_retry     url, method=method, body=body, headers=headers)   File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1291, in request     (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)   File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 132, in _request     return self.retry_on_bad_token(response, content, *args)   File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 144, in retry_on_bad_token     self.launchpad.credentials, self.launchpad.credential_store)   File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 545, in __call__     self.make_end_user_authorize_token(credentials, request_token_string)   File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 658, in make_end_user_authorize_token     self.web_root)   File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 233, in exchange_request_token_for_access_token     self.access_token = AccessToken.from_string(content)   File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 251, in from_string     key = params['oauth_token'] KeyError: 'oauth_token' The problem is that params has b'oauth_token', not 'oauth_token', which matters on python3
2017-01-06 15:17:23 Dimitri John Ledkov bug added subscriber Ubuntu Stable Release Updates Team
2017-01-12 23:25:39 Brian Murray python-launchpadlib (Ubuntu Xenial): status In Progress Fix Committed
2017-01-12 23:25:43 Brian Murray bug added subscriber SRU Verification
2017-01-12 23:25:47 Brian Murray tags verification-needed
2017-02-02 12:16:55 Colin Watson launchpadlib: status Fix Committed Fix Released
2017-02-07 10:36:38 Dimitri John Ledkov tags verification-needed verification-done
2017-02-09 03:55:38 Adam Conrad removed subscriber Ubuntu Stable Release Updates Team
2017-02-09 04:05:36 Launchpad Janitor python-launchpadlib (Ubuntu Xenial): status Fix Committed Fix Released