◐ Shell
clean mode source ↗

bpo-31130: Fix test_idle reference leaks by vstinner · Pull Request #3014 · python/cpython

@vstinner

test_configdialog:

  • VarTraceTest.setUp() now calls tracers.detach() before calling
    tracers.clear().
  • tearDownModule() now calls tracers.clear() after calling
    tracers.detach().

https://bugs.python.org/issue31130

test_configdialog:

* VarTraceTest.setUp() now calls tracers.detach() before calling
  tracers.clear().
* tearDownModule() now calls tracers.clear() after calling
  tracers.detach().

@mlouielu

LGTM. But I think the VarTraceTest use the wrong tracers, it should create its tracers, not using configdialog.tracers.

@terryjreedy

I somehow did not notice this PR when I read the issue. I independently noticed that VarTraceTest also leaked and concluded the same thing Louie did -- better to create a separate instance and delete it. The result is a merge conflict between the two patches, so I am closing this in favor of #3016, which revises and improves VarTraceTest.