-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceWarning: Object of type XXX is not untracked before destruction #3064
Comments
Also worth noting that according to apache/arrow#33765 (comment) the warning is new in 3.11, so you need 3.11-dbg to see it. |
I took a look at this briefly today and agree with @messense that the solution is to call It's not immediately obvious to me how to get it right in all cases. I also think that while we're revisiting this code we can resume looking at #2479. Rather than try to rush a fix for 0.19 I think we should release without fixing this, and make this a priority fix for 0.20. |
While investigating pydantic/pydantic-core#451 I noticed that when running on a debug build of Python, the
SchemaSerializer
pyclass with gc protocol support raised a warningand caused a segfault on debug build of Python only:
Googling it leads us to apache/arrow#33765 (comment) which mentions
PyObject_GC_UnTrack
. According to its documentationIt seems that we should call it in our generated
tp_dealloc
handler forpyclass
es that use the gc protocol?The text was updated successfully, but these errors were encountered: