Skip to content

Commit 4cc9e23

Browse files
Add a warning block around the get_referrers() documentation (GH-24511)
(cherry picked from commit 813db24) Co-authored-by: Pablo Galindo <[email protected]>
1 parent aa967ec commit 4cc9e23

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/library/gc.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ The :mod:`gc` module provides the following functions:
137137
resulting referrers. To get only currently live objects, call :func:`collect`
138138
before calling :func:`get_referrers`.
139139

140-
Care must be taken when using objects returned by :func:`get_referrers` because
141-
some of them could still be under construction and hence in a temporarily
142-
invalid state. Avoid using :func:`get_referrers` for any purpose other than
143-
debugging.
140+
.. warning::
141+
Care must be taken when using objects returned by :func:`get_referrers` because
142+
some of them could still be under construction and hence in a temporarily
143+
invalid state. Avoid using :func:`get_referrers` for any purpose other than
144+
debugging.
144145

145146
.. audit-event:: gc.get_referrers objs gc.get_referrers
146147

0 commit comments

Comments
 (0)