Commit d3de5ea
committed
Fix yield-from to close sub-iterator on GeneratorExit
When a generator doing yield-from receives GeneratorExit (e.g. from
the destructor), close the sub-iterator via close() instead of
throw(). This matches gen_close_iter() behavior: for generators/
coroutines call close(), for other iterators look for a close()
method.
Fixes unraisable exception in test_generators causing env_changed.
Also skip flaky ProcessPoolForkWaitTest.test_first_exception on macOS.1 parent c6c4d45 commit d3de5ea
File tree
6 files changed
+48
-39
lines changed- Lib/test
- test_concurrent_futures
- crates/vm/src
- protocol
- stdlib
6 files changed
+48
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
790 | 789 | | |
791 | 790 | | |
792 | 791 | | |
| |||
817 | 816 | | |
818 | 817 | | |
819 | 818 | | |
820 | | - | |
821 | 819 | | |
822 | 820 | | |
823 | 821 | | |
| |||
1135 | 1133 | | |
1136 | 1134 | | |
1137 | 1135 | | |
1138 | | - | |
1139 | 1136 | | |
1140 | 1137 | | |
1141 | 1138 | | |
| |||
1524 | 1521 | | |
1525 | 1522 | | |
1526 | 1523 | | |
1527 | | - | |
1528 | 1524 | | |
1529 | 1525 | | |
1530 | 1526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
642 | 642 | | |
643 | | - | |
644 | | - | |
| 643 | + | |
645 | 644 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
652 | 654 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 655 | + | |
659 | 656 | | |
660 | | - | |
661 | | - | |
662 | 657 | | |
663 | | - | |
664 | | - | |
665 | | - | |
| 658 | + | |
666 | 659 | | |
667 | 660 | | |
668 | 661 | | |
669 | | - | |
670 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
671 | 690 | | |
672 | 691 | | |
673 | 692 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 100 | + | |
105 | 101 | | |
106 | 102 | | |
107 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5267 | 5267 | | |
5268 | 5268 | | |
5269 | 5269 | | |
5270 | | - | |
5271 | | - | |
5272 | | - | |
| 5270 | + | |
5273 | 5271 | | |
5274 | 5272 | | |
5275 | 5273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments