aiortc / aioquic

QUIC and HTTP/3 implementation in Python
BSD 3-Clause "New" or "Revised" License
1.66k stars 236 forks source link

Fix stream writer draining exceptions. #477

Closed rthalley closed 7 months ago

rthalley commented 7 months ago

This fix is the code submitted by jmgurney in [#299] with one line added to the tests to give 100% coverage.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (e726115) to head (a2e1223).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #477 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 25 25 Lines 4891 4900 +9 ========================================= + Hits 4891 4900 +9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rthalley commented 7 months ago

I realize this API is under consideration for removal, though I think there are good reasons to have a blocking stream API as I've rolled my own multiple times for all my own use cases (I'm not doing asyncio, or if I am I want a unified API so I haven't been using this API myself. I'm also happy to see this fixed while we are pondering as it reduces the spam from the test suite.

jlaine commented 7 months ago

I know I've been threatening to pull this code for a while, but since the code is still around, might as well do it right.

jlaine commented 7 months ago

I think it would be worth adding @jmgurney in a Co-authored-by line here, it is 90% his patch :)