Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip 1.5 gunzips downloaded packages, breaking checksums #1419

Closed
gwatts opened this issue Jan 3, 2014 · 4 comments
Closed

pip 1.5 gunzips downloaded packages, breaking checksums #1419

gwatts opened this issue Jan 3, 2014 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation
Milestone

Comments

@gwatts
Copy link

gwatts commented Jan 3, 2014

Our local package repo serves tar.gz responses with a "Content-Encoding: gzip" header - Prior to 1.5, this didn't cause any problems, but now the requests library is decompressing the content as it's downloaded from the server, causing the resulting file to have an incorrect md5 checksum.

pip sets decode_content=False when setting up the http response object, but this is not honoured by the requests library during the iter_content() stream.

Setting decode_content=False in iter_content() at line 615 of pip/_vendor/requests/models.py fixes the problem for me.

Arguably this is a bug with the requests library; I'd expect iter_content() to accept a decode_stream keyword argument and for the pip library to then explicitly set that to False (or omit entirely and have it just use the object-level setting). I'll file it here though in case you have a better workaround.

@davidism
Copy link

davidism commented Jan 3, 2014

This is probably related to #1421.

@dstufft
Copy link
Member

dstufft commented Jan 3, 2014

Adding this to the 1.5.1 milestone

@dstufft
Copy link
Member

dstufft commented Jan 7, 2014

Can you verify if this PR fixes the problem for you? #1435

@dstufft
Copy link
Member

dstufft commented Jan 7, 2014

Closed with #1435

@dstufft dstufft closed this as completed Jan 7, 2014
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

3 participants