[pypy-dev] Re: How to test code that uses weakrefs

2024-09-02 Thread cpburnz
This is just my 2 cents as a PyPy user. CPython eagerly destroys unreferenced objects while PyPy will destroy them eventually. I ran into a problem with the requests library where it would create connection pool object every request, and the unreferenced pool would not be cleaned up immediately

[pypy-dev] How to test code that uses weakrefs

2024-09-02 Thread Dima Tisnek
We've got a library that supports py 3.8 .. 3.12 I though I'd give it a go with newest pypy release, and a couple of unit tests fail. I've traced it down to the expectation that objects will disappear from weakref.WeakKeyDictionary. In some cases, this is a user-facing thing, we issue a warning fo