-
Notifications
You must be signed in to change notification settings - Fork 109
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
ReadError("Server disconnected while attempting read") on 0.13.4 #357
Comments
I can see this is happening while attempting to read the stream, however the |
Oh fun. Could you share a traceback? Is this happening with any request from |
Hopefully this helps:
|
From what I could tell it was happening on all requests, maybe helpful detail - these were non-SSL requests ("http://"). I can try and put together a reproducible example later today or tomorrow |
Right, well I wasn't able to reproduce this, so at least it's not as impactful as I'd first assumed, but I can see where the issue is coming from. Our AnyIO backend is handling EOF-on-read differently from the other backends... Here... httpcore/httpcore/_backends/anyio.py Lines 64 to 65 in 5baf209
We're raising By contrast, here's Trio... httpcore/httpcore/_backends/trio.py Line 62 in 5baf209
Our previous native asyncio case... httpcore/httpcore/_backends/asyncio.py Lines 143 to 145 in 5baf209
And the sync case... httpcore/httpcore/_backends/sync.py Line 61 in 5baf209
Switching to anyio was a big codechange, so it was always going to have some associated risk
Trio's
In contrast, anyio's It would probably be worth getting some docs tweaking from @agronholm around the expectations on the
It'd be somewhat awkward if it can, because we'd need to special case that, but I'd assume it can't (shouldn't ever) and that there's just a point of documentation that needs explicitly firming up. ("wait til you've got some data and then give it to me... okay here's something-or-possibly-actually-nothing for you" would be a weird contract to have.) |
thanks for taking a look so promptly! I appreciate it, a small piece of feedback would be that maybe a change like the introduction of |
@jarojasm95 Possibly so, yes. There wasn't any API requirements for it to be a median release bump, but it clearly had a risk factor attached, which a median release would have signalled more clearly. (And some smart folks might be pinning against the median version.) Anyways, version 0.13.5 has now been released. |
After upgrading to 0.13.4 I am consistently getting
ReadError("Server disconnected while attempting read")
on all requests with no application changes.Maybe useful info is that I am setting timeouts to:
NOTE: I am using this lib as part of using
httpx
The text was updated successfully, but these errors were encountered: