New GitHub issue #119431 from Eclips4:<br>

<hr>

<pre>
# Bug report

### Bug description:

```python
./python -m test -R 3:3 test_monitoring
Using random seed: 1027068683
0:00:00 load avg: 0.28 Run 1 test sequentially
0:00:00 load avg: 0.28 [1/1] test_monitoring
beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
123:456
XXX XXX
test_monitoring leaked [18, 18, 18] references, sum=54
test_monitoring leaked [16, 16, 16] memory blocks, sum=48
test_monitoring failed (reference leak)

== Tests result: FAILURE ==

1 test failed:
    test_monitoring

Total duration: 696 ms
Total tests: run=77
Total test files: run=1/1 failed=1
Result: FAILURE
```

### CPython versions tested on:

CPython main branch

### Operating systems tested on:

Linux
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/119431">View on GitHub</a>
<p>Labels: type-bug, tests</p>
<p>Assignee: </p>