Hello,

On 2025/07/27 8:22, Daniel Sahlberg wrote:

> I'm not very fond of the idea of just disabling the tests under 3.14,
> chances are we'll never come to re-writing to weakrefs and then we've
> basically lost a test.

We've already lost a test on under Python >= 3.14, if we cannot explain
that the test is correct. I think such a test tests nothing.
> @Yasuhito FUTATSUKI <futat...@yf.bsdclub.org> Do I understand it correctly
> that you are concerned why we can keep the existing expected count ...
> 
> 434:     for baton in editor.batons:
> 435:       self.assertEqual(sys.getrefcount(baton[2]), 2,
>                              ^ HERE
> 436:                       "leak on baton %s after replay without errors"
> 437:                       % repr(baton))
> 438:     del e_baton
> 
> ... but we have to modify it ...
> 
> 439:     self.assertEqual(sys.getrefcount(e_ptr), expected,
>                              ^ HERE
> 440:                      "leak on editor baton after replay without
> errors")
Briefly, no. I worry about our test using sys.getrefcount() does not
work as we expected under modified reference counting.

> Can you outline your idea for using weakrefs?

Just collecting weakrefs of the target objects and check them before
and after removing those objects.

Cheers,
-- 
Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>

Reply via email to