Repository navigation
Translate backend EOF errors into ProxyError - #53
Open
Quinnod345 wants to merge 1 commit into
Open
Quinnod345 wants to merge 1 commit into
Quinnod345 wants to merge 1 commit into
Conversation
Catch the actual incomplete-read types produced by AnyIO v1 and asyncio v2. Preserve AnyIO's shielded EOF cleanup while using its specific handler. Add truncation, protocol-error, success and cancellation regressions. The identical 26 cases fail 14 times on upstream and pass with this fix. Owned-loopback project validation passes 429 tests on macOS Python 3.14; full Mypy retains three unchanged upstream test-helper diagnostics.
Owner
|
In asyncio v2 we should handle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AnyIO v1 catches the stdlib incomplete-read exception, but its stream raises the package exception. Asyncio v2 has the reverse mismatch. A peer closing during negotiation therefore bypasses the intended
ProxyErrorconversion.Catch each stream's actual EOF type. Keep AnyIO's existing shielded cleanup behavior when moving EOF into its specific handler. The regression uses the public proxy APIs with both AnyIO backends and asyncio v2. It covers truncated replies, protocol errors, successful tunnels and cancellation.
Local validation against upstream
8d054e5855e354735b95f2004d9fe8242920e261:Other Python versions, operating systems and hosted CI were not run locally. The close-cancellation regression uses an owned asynchronous test stream; it does not demonstrate a native transport leak.
I maintain Ponder. Its review flagged the mismatched EOF handlers and helped check cleanup preservation. I implemented the patch and ran the checks above.