From: Pablo Galindo Date: Mon, 15 Feb 2021 23:03:38 +0000 (+0000) Subject: Add a warning block around the get_referrers() documentation (GH-24511) X-Git-Tag: v3.10.0a6~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=813db24f7c2c536d587d1832c3c52b44fa9e242e;p=thirdparty%2FPython%2Fcpython.git Add a warning block around the get_referrers() documentation (GH-24511) --- diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 2d85cd343171..a3d201d5055c 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -135,10 +135,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. .. function:: get_referents(*objs)