[Bug 1729754] Re: Python3 version of launchpadlib doesn't properly upload binary attachments to Launchpad
Łukasz Zemczak
1729754 at bugs.launchpad.net
Mon Jul 23 14:42:06 UTC 2018
Hello Pierre, or anyone else affected,
Accepted python-wadllib into xenial-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/python-
wadllib/1.3.2-3ubuntu0.16.04.1 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-xenial to verification-done-xenial. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-xenial. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance!
** Changed in: python-wadllib (Ubuntu Xenial)
Status: In Progress => Fix Committed
** Tags added: verification-needed-xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-wadllib in Ubuntu.
https://bugs.launchpad.net/bugs/1729754
Title:
Python3 version of launchpadlib doesn't properly upload binary
attachments to Launchpad
Status in wadllib:
Fix Released
Status in python-wadllib package in Ubuntu:
Fix Released
Status in python-wadllib source package in Xenial:
Fix Committed
Status in python-wadllib source package in Bionic:
Fix Committed
Bug description:
Tested on 16.04 and 17.10
python-launchpadlib (1.10.5-1 on 17.10)
python3-launchpadlib (1.10.5-1 on 17.10)
While working on porting a utility using launchpadlib from Python2 to
Python3, I noticed the binary attachments were becoming unreadable.
I've tried uploading .jpg files, .tgz files, .tar.xz files, they all
fail to open properly.
P.S.: When a fix is available, can it be ported to Xenial? We need
this for our tools running on devices using Xenial.
[Test Case]
I wrote a little proof of concept that uploads a given binary attachment to a launchpad issue (see attachment). To use it on staging launchpad:
APPORT_STAGING=1 ./poc.py <bug_number> </path/to/file.bin>
When using the exact same script with python2 (basically, replacing
`python3` with `python` in the shebang line), the binary file is
properly attached. That's why I think it's a bug with
python3-launchpadlib.
[Regression Potential]
The only sensible way to fix this bug was to rewrite how wadllib does MIME-encoding of its form uploads, so it'll be important to test both text and binary uploads.
Launchpad only defines a few methods that use multipart/form-data, so
the regression potential is confined to those: bug.addAttachment,
distro_arch_series.setChroot, and project_release.add_file.
To manage notifications about this bug go to:
https://bugs.launchpad.net/wadllib/+bug/1729754/+subscriptions
More information about the foundations-bugs
mailing list