Skip to content

Commit 33ffa8e

Browse files
committed
Update comments
1 parent b0d350e commit 33ffa8e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/test_custom_type_setup.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ void add_gc_checkers_with_weakrefs(const py::object &obj) {
6464

6565
TEST_SUBMODULE(custom_type_setup, m) {
6666
py::class_<ContainerOwnsPythonObjects> cls(
67-
m, "ContainerOwnsPythonObjects", py::custom_type_setup([](PyHeapTypeObject *heap_type) {
67+
m,
68+
"ContainerOwnsPythonObjects",
69+
// Please review/update docs/advanced/classes.rst after making changes here.
70+
py::custom_type_setup([](PyHeapTypeObject *heap_type) {
6871
auto *type = &heap_type->ht_type;
6972
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
7073
type->tp_traverse = [](PyObject *self_base, visitproc visit, void *arg) {

tests/test_custom_type_setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ def test_indirect_cycle(gc_tester):
5858
)
5959
@pytest.mark.skipif("env.PYPY or env.GRAALPY")
6060
def test_py_cast_useable_on_shutdown():
61-
"""Test that py::cast works during interpreter shutdown."""
61+
"""Test that py::cast works during interpreter shutdown.
62+
63+
See PR #5972 and https://github.com/pybind/pybind11/pull/5958#discussion_r2717645230.
64+
"""
6265
env.check_script_success_in_subprocess(
6366
f"""
6467
import sys

0 commit comments

Comments
 (0)