[Python-checkins] Add a warning block around the get_referrers() documentation (GH-24511)

miss-islington webhook-mailer at python.org
Wed Mar 17 20:26:15 EDT 2021


https://github.com/python/cpython/commit/4cc9e2348b6a8430dc21cb7ff8c9850d16f772f9
commit: 4cc9e2348b6a8430dc21cb7ff8c9850d16f772f9
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-03-17T17:26:07-07:00
summary:

Add a warning block around the get_referrers() documentation (GH-24511)

(cherry picked from commit 813db24f7c2c536d587d1832c3c52b44fa9e242e)

Co-authored-by: Pablo Galindo <Pablogsal at gmail.com>

files:
M Doc/library/gc.rst

diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst
index 4558081b1dbe8..69a1a8313b759 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
 



More information about the Python-checkins mailing list