Commit 925dc7f
authored
The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a agen.aclose() coroutine object. It accidentally also prevented you from calling aclose() at all on an async generator that was already closed or exhausted. This commit fixes it so we're only blocking the actually illegal cases, while allowing the legal cases. The new tests failed before this patch. Also confirmed that this fixes the test failures we were seeing in Trio with Python dev builds: python-trio/trio#1396 https://bugs.python.org/issue39606
1 parent 7514f4f commit 925dc7f
File tree
3 files changed
+41
-6
lines changed- Lib/test
- Misc/NEWS.d/next/Core and Builtins
- Objects
3 files changed
+41
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1128 | 1128 | | |
1129 | 1129 | | |
1130 | 1130 | | |
1131 | | - | |
| 1131 | + | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | | - | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1167 | 1193 | | |
1168 | 1194 | | |
1169 | 1195 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1797 | 1797 | | |
1798 | 1798 | | |
1799 | 1799 | | |
1800 | | - | |
1801 | | - | |
| 1800 | + | |
1802 | 1801 | | |
1803 | 1802 | | |
1804 | 1803 | | |
1805 | 1804 | | |
1806 | 1805 | | |
1807 | 1806 | | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
1808 | 1813 | | |
1809 | 1814 | | |
| 1815 | + | |
1810 | 1816 | | |
1811 | 1817 | | |
1812 | 1818 | | |
| |||
1878 | 1884 | | |
1879 | 1885 | | |
1880 | 1886 | | |
1881 | | - | |
1882 | 1887 | | |
1883 | 1888 | | |
1884 | 1889 | | |
| |||
1893 | 1898 | | |
1894 | 1899 | | |
1895 | 1900 | | |
| 1901 | + | |
1896 | 1902 | | |
1897 | 1903 | | |
1898 | 1904 | | |
1899 | 1905 | | |
1900 | 1906 | | |
1901 | 1907 | | |
| 1908 | + | |
1902 | 1909 | | |
1903 | 1910 | | |
1904 | 1911 | | |
1905 | | - | |
1906 | 1912 | | |
1907 | 1913 | | |
1908 | 1914 | | |
| |||
1936 | 1942 | | |
1937 | 1943 | | |
1938 | 1944 | | |
| 1945 | + | |
1939 | 1946 | | |
1940 | 1947 | | |
1941 | 1948 | | |
| |||
0 commit comments