Closed siscia closed 1 year ago
Good catch!
The correct solution is to Py_INCREF(Py_None)
when it is assigned. That's what we do in other places, and what is done in Python's core. Please update the PR.
Wonderful I will try to follow up tonight!
Addressed!
Let me know if you need me to squash the commits or to fix the history somehow!
Yes please, squash the commits.
Done!
Addressing #1161
If the representation of a signature requires the use of
Py_None
we should not decrement the reference count of the specialPy_None
object.I tried adding a unit test to verify this new behavior, unfortunately, all the unit test I could come up with were not triggering the bug.
This was tested against the reproduce example in the issue setting the env var PYTHONPATH.