It seems that python3-ubuntutools switched from using urllib.request.urlopen() to requests.get() when fetching sources using the pull() method. For the sake of providing a progress bar, both the old code and the new code "streamed" the data by asking for chunks at a time, incrementally saving those to disk, and then later checking the size and checksum. But the switch to requests now inadvertently _decompresses_ files, in the case for example of a .diff.gz. The uncompressed data gets written to a file named something.diff.gz, which of course is now larger than expected.
For validation purposes we require the original unmodified file to be written to disk. I don't see a way of getting the requests library to handle transfer encoding but not content encoding without using undocumented API. As far as I can tell, the raw attribute would give me neither. Perhaps "Accept-Encoding: identity" in the request would help? Would that be correct in all cases? -- You received this bug notification because you are a member of MOTU, which is subscribed to ubuntu-dev-tools in Ubuntu. https://bugs.launchpad.net/bugs/2025748 Title: Launchpad downloads fail with "incorrect size, got X expected Y" To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/2025748/+subscriptions -- universe-bugs mailing list firstname.lastname@example.org https://lists.ubuntu.com/mailman/listinfo/universe-bugs