I've poked at this some, originally assuming there was some silly
decode() in a python3 path that was losing data, but I did not see it.
In both python2 and python3 we get to Http._request (in httplib2/__init__.py).
with the same body (minus python3 bytes, python2 string).

To break there, add 'import pdb; pdb.set_trace()' and then:
  import httplib2
  break httplib2.Http._request

You'll see at that point that py3 has bytes in its body and py2 and py3
headers are below:

python2
{'Authorization': 'OAuth realm="OAuth <snip> LHZx0NKGQ4g5S84Dn5mfmFR"',
 'accept': 'application/json',
 'accept-encoding': 'gzip, deflate',
 'content-type': 'multipart/form-data; 
boundary="===============4087956070816413326=="',
 'user-agent': u'lazr.restfulclient 0.14.0; application="test"; 
oauth_consumer="System-wide: Ubuntu (milhouse)"'}

python3
{b'Authorization': b'OAuth realm="OAuth <snip> GQ4g5S84Dn5mfmFR"',
 'accept': 'application/json',
 'accept-encoding': 'gzip, deflate',
 'content-type': 'multipart/form-data; 
boundary="===============5370337788628842176=="',
 'user-agent': 'lazr.restfulclient 0.14.0; application="test"; '
               'oauth_consumer="System-wide: Ubuntu (milhouse)"'}


I'm not sure where it is going wrong from that point.


** Changed in: python-launchpadlib (Ubuntu)
   Importance: Undecided => High

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

Title:
  [py3] corrupts binary bug attachments

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-launchpadlib/+bug/1425575/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to