Repository navigation
Commit 5abbc18
* 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 9c1ff40 commit 5abbc18
3 files changed
Lines changed: 51 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
329 | 343 | | |
330 | 344 | | |
331 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4207 | 4207 | | |
4208 | 4208 | | |
4209 | 4209 | | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
4210 | 4227 | | |
4211 | 4228 | | |
4212 | 4229 | | |
| |||
4378 | 4395 | | |
4379 | 4396 | | |
4380 | 4397 | | |
| 4398 | + | |
4381 | 4399 | | |
4382 | 4400 | | |
4383 | 4401 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments