** Description changed:
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 wrote a little proof of concept that uploads a given binary attachment
- to a launchpad issue (see attachment). To use it on staging launchpad:
+ 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.
- I've tried uploading .jpg files, .tgz files, .tar.xz files, they all
- fail to open properly.
+ [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.
- P.S.: When a fix is available, can it be ported to Xenial? We need this
- for our tools running on devices using Xenial.
+ 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.
** Changed in: python-wadllib (Ubuntu)
Status: New => Fix Committed
** Changed in: python-wadllib (Ubuntu)
Importance: Undecided => High
** Changed in: python-wadllib (Ubuntu)
Assignee: (unassigned) => Colin Watson (cjwatson)
** Changed in: python-wadllib (Ubuntu Xenial)
Status: New => In Progress
** Changed in: python-wadllib (Ubuntu Xenial)
Importance: Undecided => High
** Changed in: python-wadllib (Ubuntu Xenial)
Assignee: (unassigned) => Colin Watson (cjwatson)
** Changed in: python-wadllib (Ubuntu Bionic)
Status: New => In Progress
** Changed in: python-wadllib (Ubuntu Bionic)
Importance: Undecided => High
** Changed in: python-wadllib (Ubuntu Bionic)
Assignee: (unassigned) => Colin Watson (cjwatson)
** Patch added: "debdiff for xenial"
https://bugs.launchpad.net/ubuntu/+source/python-wadllib/+bug/1729754/+attachment/5165657/+files/python-wadllib_1.3.2-3ubuntu0.16.04.1.debdiff
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1729754
Title:
Python3 version of launchpadlib doesn't properly upload binary
attachments to Launchpad
To manage notifications about this bug go to:
https://bugs.launchpad.net/wadllib/+bug/1729754/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs