Commit 25d75bb
committed
Use list.append for session_id capture to fix 3.11 coverage gap
On Python 3.11 with coverage 7.10.7 (lowest-direct), plain statements
immediately after async with sse_client(...) exits are not traced
reliably due to cancellation in __aexit__ interacting with 3.11's
zero-cost exception bytecode. Entering a new async with block does
generate a line event, so removing the intermediate assert and indexing
the list directly inside the httpx block sidesteps the tracer gap
without needing a pragma.1 parent f0057a5 commit 25d75bb
1 file changed
Lines changed: 3 additions & 9 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
| 625 | + | |
630 | 626 | | |
631 | 627 | | |
632 | | - | |
| 628 | + | |
633 | 629 | | |
634 | 630 | | |
635 | 631 | | |
636 | | - | |
637 | | - | |
638 | 632 | | |
639 | 633 | | |
640 | 634 | | |
641 | 635 | | |
642 | | - | |
| 636 | + | |
643 | 637 | | |
644 | 638 | | |
645 | 639 | | |
| |||
0 commit comments