]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a warning block around the get_referrers() documentation (GH-24511)
authorPablo Galindo <Pablogsal@gmail.com>
Mon, 15 Feb 2021 23:03:38 +0000 (23:03 +0000)
committerGitHub <noreply@github.com>
Mon, 15 Feb 2021 23:03:38 +0000 (23:03 +0000)
Doc/library/gc.rst

index 2d85cd3431711ab603ba517858725c5c06ec0e91..a3d201d5055c8ecda55c5a4c4bcb5c74b6b6b689 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)