Repository navigation
Commit 233b95c
* 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
---------
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
1 parent 4b66b87 commit 233b95c
3 files changed
Lines changed: 51 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
332 | 346 | | |
333 | 347 | | |
334 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4218 | 4218 | | |
4219 | 4219 | | |
4220 | 4220 | | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
4221 | 4238 | | |
4222 | 4239 | | |
4223 | 4240 | | |
| |||
4389 | 4406 | | |
4390 | 4407 | | |
4391 | 4408 | | |
| 4409 | + | |
4392 | 4410 | | |
4393 | 4411 | | |
4394 | 4412 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments