Hi all,
I have a project which provides type validated version of the standard list, dict and set object. For performance, the implementation is in C. As a consequence all methods adding new entries need to be wrapped to validate the new values.
My specific problem is with updating a set. Currently the project uses _PySet_Update
(atom/atom/src/atomset.cpp at main · nucleic/atom · GitHub). However this function is now masked in Python 3.13 and I as a consequence I tried to move away from. One experiment can be found at atomset experiments · nucleic/atom@ff93bb3 · GitHub (in which I load the method definition from the type ahead of time). It does compile but segfault. What I do not understand is that I checked that the input parameters are not null but looking at a backtrace it appears the segfault comes from a Py_INCREF
deep into the set update function.
I also tried to access the method using PyObject_GetAttrString
and then use PyCall_CallFunctionObjArgs
with the same result.
If anybody has a idea of what could cause this behavior or explain how to access _PySet_Update under 3.13 I am very keen to hear it.
Best
Matthieu