From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 18 Mar 2021 00:26:07 +0000 (-0700) Subject: Add a warning block around the get_referrers() documentation (GH-24511) X-Git-Tag: v3.9.3~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cc9e2348b6a8430dc21cb7ff8c9850d16f772f9;p=thirdparty%2FPython%2Fcpython.git Add a warning block around the get_referrers() documentation (GH-24511) (cherry picked from commit 813db24f7c2c536d587d1832c3c52b44fa9e242e) Co-authored-by: Pablo Galindo --- diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 4558081b1dbe..69a1a8313b75 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -137,10 +137,11 @@ The :mod:`gc` module provides the following functions: resulting referrers. To get only currently live objects, call :func:`collect` before calling :func:`get_referrers`. - Care must be taken when using objects returned by :func:`get_referrers` because - some of them could still be under construction and hence in a temporarily - invalid state. Avoid using :func:`get_referrers` for any purpose other than - debugging. + .. warning:: + Care must be taken when using objects returned by :func:`get_referrers` because + some of them could still be under construction and hence in a temporarily + invalid state. Avoid using :func:`get_referrers` for any purpose other than + debugging. .. audit-event:: gc.get_referrers objs gc.get_referrers