-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix requests auto decode file #8701
fix requests auto decode file #8701
Conversation
only happens when Content-Encoding: gzip
poetry downloads probably millions of tar.gz files every day without issue: the real problem here is that your server is misconfigured. the proposed fix will break things for people whose servers are correctly configured and who are (admittedly unnecessarily) zipping the tar.gz for download. pip tried the same fix years ago and saw exactly that - pypa/pip#1435 Having said that, they do now seem to have landed in a place where they try to compensate for misconfigured servers by using personally I would prefer that you corrected your server configuration and we left poetry alone, but if you want to pursue this path here then there is more to do. edit: on reflection I think that just setting |
updated code according to your request. |
looks ok to me (once you fix up the linting). Does it work in getting your server to behave itself? |
I fix this issue by remove Content-Encoding from my server (flask based pypi mirror which is not support Accept-Encoding: Identity) |
how to fix the linting? any tools? |
Per the errors! ruff and black |
To make the pr simple, I removed the tests code |
No chance for a PR to be merged without tests of any kind. If you don't want to write tests for that, close this PR. |
That just sounds so wrong. 😄 Nevertheless, I think the change itself makes sense, so I just converted your test from pytest-httpserver to httpretty, which was quite simple. |
pre-commit.ci autofix |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
only happens when Content-Encoding: gzip
Pull Request Check List
Resolves: #4523