On 2024/09/26 17:45, Stefan Sperling wrote: > Perhaps the issue is a race condition? In any case, I will let you > decide whether your prefer leaving the test as it is or whether your > new patch improves the test and should be committted.
Python library reference for weakref module[1] mentions only the fact that even if there are no strong references to a object the weak reference of the object may return that object, until the object is acutually destoryed, but does not mention when it can occure. So it may occur by a race condition, but I'm not sure. Also it may occur by change of the object life time management, e.g. if destruction of objects would delay until leaving a function scope even if the object was explicitly deleted by del statement, weakrefs may survive within the scope. However, it seems there are some other tests rely on weakref, so I'm still not sure what it should be. [1] https://docs.python.org/3/library/weakref.html Thanks, -- Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>