[Bug 1471894] Missing SRU information

Brian Murray brian at ubuntu.com
Thu Jan 5 21:25:55 UTC 2017


Thanks for uploading the fix for this bug report to -proposed.  However,
when reviewing the package in -proposed and the details of this bug
report I noticed that the bug description is missing information
required for the SRU process.  You can find full details at
http://wiki.ubuntu.com/StableReleaseUpdates#Procedure but essentially
this bug is missing some of the following: a statement of impact, a test
case and details regarding the regression potential.  Thanks in advance!

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-launchpadlib in Ubuntu.
https://bugs.launchpad.net/bugs/1471894

Title:
  _bad_oauth_token crashes on python3 (str vs bytes)

Status in launchpadlib :
  Fix Released
Status in python-launchpadlib package in Ubuntu:
  Fix Released
Status in python-launchpadlib source package in Xenial:
  In Progress

Bug description:
  Hi

  Running something as simple as

  >>> from launchpadlib.launchpad import Launchpad
  >>> launchpad = Launchpad.login_with("app", "production")

  Results in a traceback such as this one:

  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 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("Expired token")
  TypeError: startswith first arg must be bytes or a tuple of bytes, not str

  
  This doesn't happen on python2. I will follow up with a patch shortly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/launchpadlib/+bug/1471894/+subscriptions



More information about the foundations-bugs mailing list