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

miss-islington webhook-mailer at python.org
Mon Feb 15 18:12:41 EST 2021


https://github.com/python/cpython/commit/f30aa3c44f807da5db9b053fba96578a8210a3c2
commit: f30aa3c44f807da5db9b053fba96578a8210a3c2
branch: 3.8
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-02-15T15:12:34-08: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 adaa30295b5e8..073391d9058bf 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)



More information about the Python-checkins mailing list