Repository navigation
Commit 65d8923
* gh-162616: Clear asyncio's `iscoroutine_typecache`s between refleak tests
Creating a task checks if the argument is a coroutine. For non-native
coroutines, this adds the type (the test's `Wrapper`) to `_asyncio`'s
`iscoroutine_typecache`.
Another check adds it to `asyncio.coroutines._iscoroutine_typecache`.
Both caches are capped at 100 entries, so refleak tests report a reference
leak unless you run 100+ warmup runs.
Clear both caches in `libregrtest.utils.clear_caches`.
* Apply suggestions from code review
---------
(cherry picked from commit 233b95c)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 465d2fb commit 65d8923
3 files changed
Lines changed: 51 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
310 | 324 | | |
311 | 325 | | |
312 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4222 | 4222 | | |
4223 | 4223 | | |
4224 | 4224 | | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
4225 | 4242 | | |
4226 | 4243 | | |
4227 | 4244 | | |
| |||
4393 | 4410 | | |
4394 | 4411 | | |
4395 | 4412 | | |
| 4413 | + | |
4396 | 4414 | | |
4397 | 4415 | | |
4398 | 4416 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments