You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: merge stream and task-group contexts to satisfy 3.11 branch coverage
Python 3.11's bytecode for nested async with blocks produces extra
branch arcs that coverage.py tracks but the test suite doesn't
exercise. Merging the stream context-managers with the task group
into a single async with restores the same nesting depth as main,
so branch count stays at 4 instead of 6.
Teardown order is also slightly better this way: tg.__aexit__ runs
first (waits for cancelled tasks), then stream ends close in reverse
order — tasks are fully done before streams close.
0 commit comments