diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-03-10 00:53:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 00:53:57 (GMT) |
commit | b4f9089d4aa787c5b74134c98e5f0f11d9e63095 (patch) | |
tree | 26bfa4b05e2e5371f1473ca108b1451bcd49de6d /Doc | |
parent | 62a03cd490f81c0fb01eaceb31aa8a4c7800ed0e (diff) | |
download | cpython-b4f9089d4aa787c5b74134c98e5f0f11d9e63095.zip cpython-b4f9089d4aa787c5b74134c98e5f0f11d9e63095.tar.gz cpython-b4f9089d4aa787c5b74134c98e5f0f11d9e63095.tar.bz2 |
bpo-43439: Add audit hooks for gc functions (GH-24794)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/gc.rst | 5 | ||||
-rw-r--r-- | Doc/whatsnew/3.10.rst | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index a3d201d..69a1a83 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -72,6 +72,8 @@ The :mod:`gc` module provides the following functions: .. versionchanged:: 3.8 New *generation* parameter. + .. audit-event:: gc.get_objects generation gc.get_objects + .. function:: get_stats() Return a list of three per-generation dictionaries containing collection @@ -141,6 +143,8 @@ The :mod:`gc` module provides the following functions: invalid state. Avoid using :func:`get_referrers` for any purpose other than debugging. + .. audit-event:: gc.get_referrers objs gc.get_referrers + .. function:: get_referents(*objs) @@ -152,6 +156,7 @@ The :mod:`gc` module provides the following functions: be involved in a cycle. So, for example, if an integer is directly reachable from an argument, that integer object may or may not appear in the result list. + .. audit-event:: gc.get_referents objs gc.get_referents .. function:: is_tracked(obj) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index db71f06..814594a 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -673,9 +673,16 @@ When a module does not define ``__loader__``, fall back to ``__spec__.loader``. encodings --------- + :func:`encodings.normalize_encoding` now ignores non-ASCII characters. (Contributed by Hai Shi in :issue:`39337`.) +gc +-- + +Added audit hooks for :func:`gc.get_objects`, :func:`gc.get_referrers` and +:func:`gc.get_referents`. (Contributed by Pablo Galindo in :issue:`43439`.) + glob ---- |