-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Response truncated with requests 2.30.0 and urllib3 2.0.1 #6439
Comments
Thanks for the report @DrShushen, this may be worth raising on the urllib3 tracker since you've confirmed it's a regression when upgrading to urllib3 2.0. This is the code we use to read content off the underlying connection from urllib3 which hasn't changed recently. It's not immediately clear if this is a breaking change with how urllib3 responds or if we're not reading correctly in their new setup. |
We've confirmed this is reproducible. We're still investigating but initial assumptions is we may be receiving false-y responses mid-stream which is short circuiting our reads. Trying to come up with a simpler repro with urllib3. We'll update shortly, this may mean we need to yank Requests 2.30.0. |
For us in CI testing, the |
We've yanked the release from PyPI. I've provided a urllib3 specific reproduction to the ticket opened by @DrShushen (urllib3/urllib3#3009) which is where we'll track this issue going forward. The scope of impact seems to be constrained to streamed, compressed responses. For the time being, we'd advise users to avoid upgrading to urllib3 2.0 out of band to limit potential data corruption. |
Fix is here: urllib3/urllib3#3012 |
We'll plan to "un-yank" 2.30.0 at some point tomorrow pending the release of urllib3 2.0.2 with the fix linked above. |
urllib3 2.0.2 has been released with a fix for this issue: https://github.com/urllib3/urllib3/releases/tag/2.0.2 |
We've also yanked urllib3 2.0.0 and 2.0.1 to avoid future data integrity issues |
Requests 2.30.0 has been unyanked. With the removal of urllib3 2.0.0 and 2.0.1, we don't anticipate any more issues with this regression. Going to close this but please let us know if you have any further concerns. |
Expected Result
Expect to see the entire content of the file pbc2.csv:
Actual Result
Get the content of the file truncated around line
1683
(out of total1946
lines):Reproduction Steps
System Information
More Information
The problem stops happening if I downgrade
urllib3
(pip install "urllib3<2"
), see$ python -m requests.help
:So this seems to be related to
urllib3 v2
support inrequests v2.30.0
.The text was updated successfully, but these errors were encountered: