Commit 6adb7a4
authored
[mypyc] Fix calling async methods through vectorcall (#20393)
Fixes mypyc/mypyc#1170
Fixed a bug introduced when adding the async function wrapper in
81eaa5d
that would result in `TypeErrors` being raised when the wrapped function
was called using the vectorcall protocol.
The exception was caused by the wrapper keeping the `self` argument of
methods in the `args` vector instead of extracting it to a separate c
function argument. The called function would not expect the `self`
argument to be part of `args` so it appeared as if too many arguments
were passed.1 parent 88a3c58 commit 6adb7a4
File tree
4 files changed
+33
-9
lines changed- mypyc
- codegen
- lib-rt
- test-data
4 files changed
+33
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
1222 | 1222 | | |
1223 | 1223 | | |
1224 | 1224 | | |
| 1225 | + | |
1225 | 1226 | | |
1226 | 1227 | | |
1227 | 1228 | | |
1228 | | - | |
| 1229 | + | |
1229 | 1230 | | |
1230 | 1231 | | |
1231 | 1232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
185 | | - | |
| 190 | + | |
186 | 191 | | |
187 | 192 | | |
188 | 193 | | |
189 | | - | |
| 194 | + | |
190 | 195 | | |
191 | 196 | | |
192 | 197 | | |
| |||
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
229 | | - | |
| 234 | + | |
230 | 235 | | |
231 | 236 | | |
| 237 | + | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
| |||
245 | 251 | | |
246 | 252 | | |
247 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
248 | 260 | | |
249 | | - | |
| 261 | + | |
| 262 | + | |
250 | 263 | | |
251 | 264 | | |
252 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | 251 | | |
247 | | - | |
| 252 | + | |
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
254 | 262 | | |
255 | 263 | | |
256 | 264 | | |
| |||
1516 | 1524 | | |
1517 | 1525 | | |
1518 | 1526 | | |
1519 | | - | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1520 | 1530 | | |
1521 | 1531 | | |
1522 | 1532 | | |
| |||
0 commit comments