> Why setting it back to release blocker? As far as I recall, this issue is not
> a Python 3.8 regression. The regression which triggered this old and existing
> bug has been fixed, see previous comments.
I leave it up to our glorious release manager to decide how to proceed. IMHO,
GH-15826 (revert the addition of tp_clear for functions) and GH-15641 (Avoid
closure in weakref.WeakValueDictionary) are two cases of not fixing the real
bug, just hiding symptoms. However, since this bug has existed for decades, I
wouldn't fault him for taking the conservative approach and not trying to
address the real bug in 3.8.
I've created a new PR (GH-16083) that I think is the correct fix. If that PR
is applied, I think we should also restore tp_clear for functions (revert
GH-15826). GH-15641 can probably stay.
Tim on my rough patch:
> It's semantically correct since we never wanted to execute a callback from a
> trash weakref to begin with
Thanks for your help Tim. I think my PR is a cleaner fix that does essentially
the same thing. Just call _PyWeakref_ClearRef() on weakrefs that are in
'unreachable'. |