It's a useful (thread safe) function, and so it'd be useful to have direct access rather than needing to go through a Python function call.
(I will prepare a PR for this shortly so no-one else need do anything, please)
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
I've raised it on the C API working group and it's been approved - capi-workgroup/decisions#85. The drop-down above doesn't let me choose that as an option.
Activity
gh-141726: Add PyDict_SetDefaultRef() to the Stable ABI (#141727)
da-woods commented on Nov 19, 2025
This is done I believe - it shouldn't be backported so there's nothing more to do
vstinner commented on Nov 19, 2025
Correct, it's only added to the limited C API version 3.15.
pythongh-141726: Add PyDict_SetDefaultRef() to the Stable ABI (python…
pythongh-141726: Add PyDict_SetDefaultRef() to the Stable ABI (python…