Skip to content
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

Add support for persistent H3 connections. #1184

Merged
merged 3 commits into from
Mar 20, 2025

Conversation

bwelling
Copy link
Collaborator

@bwelling bwelling commented Mar 7, 2025

No description provided.

@bwelling
Copy link
Collaborator Author

bwelling commented Mar 7, 2025

It might be worth marking this as beta, or subject to change in the future, as if httpx ever gains h3 support, then we'd want to use that (for consistency with h1 and h2) rather than aioquic.

@bwelling
Copy link
Collaborator Author

bwelling commented Mar 7, 2025

I'm not sure why pyright is complaining here, as the code is basically identical to that in the quic methods, which it doesn't complain about.

@rthalley
Copy link
Owner

pyright (and mypy) don't always figure out non-trivial dependency arrangements. Also, the quic code works because it has # pyright: ignore on the assignment. (which is bad as there is no timeout parameter for make_stream in the sync case, which we miss!)

Probably the better way to do this is to declare the_connection to be Optional[dns.quic.SyncQuicConnection], initialize it to None. It will probably figure out that it's always None, but if not (or if mypy doesn't) then assert this_connection is not None right before use will fix it.

@rthalley rthalley merged commit 0675835 into rthalley:main Mar 20, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants