gh-123619: Add an unstable C API function for enabling deferred reference counting#123635
gh-123619: Add an unstable C API function for enabling deferred reference counting#123635encukou merged 38 commits intopython:mainfrom
Conversation
|
Looks like my git email got screwed up... I'll fix that later. |
4d37dc8 to
6af0adf
Compare
|
I think we want this or something similar, but it needs to go through the C API working group first: https://github.com/capi-workgroup/decisions/ |
|
Sounds good. Though, there might be some technical issues here that I'm not thinking of. I proposed something similar using immortal objects rather than DRC, but it seems that we just can't ensure enough support for it to be worthwhile. |
colesbury
left a comment
There was a problem hiding this comment.
As @encukou wrote in capi-workgroup/decisions#42, this needs a test (in _testcapimodule.c). I think the primary thing we can test is that the preconditions are enforced and that the return codes are correct.
Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
I'll get to updating the rest of this sometime later today. |
|
I've added a test. At this point, is the |
…ython into api-deferred-rc
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
… reference counting (pythonGH-123635) Co-authored-by: Sam Gross <colesbury@gmail.com>
… reference counting (pythonGH-123635) Co-authored-by: Sam Gross <colesbury@gmail.com>
cc @Fidget-Spinner
📚 Documentation preview 📚: https://cpython-previews--123635.org.readthedocs.build/en/123635/c-api/object.html#c.PyUnstable_Object_SetDeferredRefcount