You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: