Commit b44637f
When the outer future returned by shield() was cancelled, a callback was
added to the inner future that reported its exception through the loop
exception handler as soon as it completed, even if the exception was
retrieved afterwards by awaiting the inner future or calling
`exception()`. Remove the callback; an exception nobody retrieves is
still reported by the inner future itself when it is garbage collected,
like any other future.
(cherry picked from commit 2095eab)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 1e1ebf6 commit b44637f
3 files changed
Lines changed: 35 additions & 26 deletions
File tree
- Lib
- asyncio
- test/test_asyncio
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | 930 | | |
950 | 931 | | |
951 | 932 | | |
| |||
1010 | 991 | | |
1011 | 992 | | |
1012 | 993 | | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | 994 | | |
1017 | 995 | | |
1018 | 996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2148 | 2148 | | |
2149 | 2149 | | |
2150 | 2150 | | |
2151 | | - | |
| 2151 | + | |
2152 | 2152 | | |
2153 | 2153 | | |
2154 | 2154 | | |
| |||
2163 | 2163 | | |
2164 | 2164 | | |
2165 | 2165 | | |
| 2166 | + | |
| 2167 | + | |
2166 | 2168 | | |
2167 | 2169 | | |
2168 | 2170 | | |
| |||
2172 | 2174 | | |
2173 | 2175 | | |
2174 | 2176 | | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
2175 | 2196 | | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
2176 | 2200 | | |
2177 | 2201 | | |
2178 | 2202 | | |
| |||
2187 | 2211 | | |
2188 | 2212 | | |
2189 | 2213 | | |
2190 | | - | |
| 2214 | + | |
2191 | 2215 | | |
2192 | | - | |
| 2216 | + | |
2193 | 2217 | | |
2194 | 2218 | | |
2195 | 2219 | | |
| |||
2201 | 2225 | | |
2202 | 2226 | | |
2203 | 2227 | | |
| 2228 | + | |
2204 | 2229 | | |
2205 | 2230 | | |
2206 | | - | |
| 2231 | + | |
| 2232 | + | |
2207 | 2233 | | |
2208 | 2234 | | |
2209 | 2235 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments