]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a warning block around the get_referrers() documentation (GH-24511)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 15 Feb 2021 23:12:34 +0000 (15:12 -0800)
committerGitHub <noreply@github.com>
Mon, 15 Feb 2021 23:12:34 +0000 (15:12 -0800)
(cherry picked from commit 813db24f7c2c536d587d1832c3c52b44fa9e242e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Doc/library/gc.rst

index adaa30295b5e8b0da82d94ce78be2dd777f11dab..073391d9058bf7dcda2bbcd5d4f07a6c79ed94e0 100644 (file)
@@ -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)