]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a warning block around the get_referrers() documentation (GH-24511) (GH-24544)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Feb 2021 00:58:05 +0000 (16:58 -0800)
committerGitHub <noreply@github.com>
Tue, 16 Feb 2021 00:58:05 +0000 (19:58 -0500)
(cherry picked from commit 813db24f7c2c536d587d1832c3c52b44fa9e242e)

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

index 1f09ed52ce867ce20e3207436efdfb3627ffeeb5..7ee71dc4462719f5ed8d6bc58b09f547e80a893d 100644 (file)
@@ -132,10 +132,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)