Yes, I can confirm that the package in -proposed fixes that.
Now:
$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from launchpadlib.launchpad import Launchpad
>>> def no_credential():
... print("Can't proceed without Launchpad credential.")
... sys.exit()
...
>>> launchpad = Launchpad.login_with('Test', 'production', credential_save_failed=no_credential, version='devel')
>>> me = launchpad.me
>>> me.getPPAByName(name="openjdk")
The authorization page:
(https://launchpad.net/+authorize-token?oauth_token=NotMyRealTokenOfCourse&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Waiting to hear from Launchpad about your decision...
Created new window in existing browser session.
<archive at https://api.launchpad.net/devel/~tdaitx/+archive/ubuntu/openjdk>
Before:
$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from launchpadlib.launchpad import Launchpad
>>> def no_credential():
... print("Can't proceed without Launchpad credential.")
... sys.exit()
...
>>> launchpad = Launchpad.login_with('Test', 'production', credential_save_failed=no_credential, version='devel')
>>> me = launchpad.me
>>> me.getPPAByName(name="openjdk")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 609, in __call__
extra_headers=extra_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 1312, 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 139, in retry_on_bad_token
if (self._bad_oauth_token(response, content)
File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 125, in _bad_oauth_token
(content.startswith(b"Expired token")
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Yes, I can confirm that the package in -proposed fixes that.
Now: launchpad import Launchpad login_with( 'Test', 'production', credential_ save_failed= no_credential, version='devel') (name=" openjdk" ) /launchpad. net/+authorize- token?oauth_ token=NotMyReal TokenOfCourse& allow_permissio n=DESKTOP_ INTEGRATION) /api.launchpad. net/devel/ ~tdaitx/ +archive/ ubuntu/ openjdk>
$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from launchpadlib.
>>> def no_credential():
... print("Can't proceed without Launchpad credential.")
... sys.exit()
...
>>> launchpad = Launchpad.
>>> me = launchpad.me
>>> me.getPPAByName
The authorization page:
(https:/
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Waiting to hear from Launchpad about your decision...
Created new window in existing browser session.
<archive at https:/
Before: launchpad import Launchpad login_with( 'Test', 'production', credential_ save_failed= no_credential, version='devel') (name=" openjdk" ) python3/ dist-packages/ lazr/restfulcli ent/resource. py", line 609, in __call__ headers= extra_headers) python3/ dist-packages/ lazr/restfulcli ent/_browser. py", line 387, in _request python3/ dist-packages/ lazr/restfulcli ent/_browser. py", line 357, in _request_and_retry python3/ dist-packages/ httplib2/ __init_ _.py", line 1312, in request python3/ dist-packages/ launchpadlib/ launchpad. py", line 132, in _request on_bad_ token(response, content, *args) python3/ dist-packages/ launchpadlib/ launchpad. py", line 139, in retry_on_bad_token bad_oauth_ token(response, content) python3/ dist-packages/ launchpadlib/ launchpad. py", line 125, in _bad_oauth_token startswith( b"Expired token")
$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from launchpadlib.
>>> def no_credential():
... print("Can't proceed without Launchpad credential.")
... sys.exit()
...
>>> launchpad = Launchpad.
>>> me = launchpad.me
>>> me.getPPAByName
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
extra_
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/
if (self._
File "/usr/lib/
(content.
TypeError: startswith first arg must be bytes or a tuple of bytes, not str