Skip to content

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Oct 12, 2025

Description

Currently this PR is only pin-pointing code we need to review, based on a quick manual review (master @ commit aa4259b) of:

$ cd include/pybind11/
$ git grep -e Py_DECREF -e Py_XDECREF | cut -d: -f1 | uniq conduit/pybind11_conduit_v1.h
detail/class.h
detail/cpp_conduit.h
detail/type_caster_base.h
gil_safe_call_once.h
numpy.h
pybind11.h
pytypes.h
stl.h
stl/filesystem.h
trampoline_self_life_support.h

I think we should look into the suggestions here:

Related: We should also look into our existing uses of _Py_IsFinalizing(). I think we should (or even need to later) have an is_finalizing() helper:

Suggested changelog entry:

  • Placeholder.

Based on manual review of:

$ cd include/pybind11/
$ git grep -e Py_DECREF -e Py_XDECREF | cut -d: -f1 | uniq
conduit/pybind11_conduit_v1.h
detail/class.h
detail/cpp_conduit.h
detail/type_caster_base.h
gil_safe_call_once.h
numpy.h
pybind11.h
pytypes.h
stl.h
stl/filesystem.h
trampoline_self_life_support.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant