]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-114616: Improve docs regarding changes to caches representation in dis (#120033)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Tue, 4 Jun 2024 23:00:02 +0000 (00:00 +0100)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 23:00:02 +0000 (23:00 +0000)
Doc/library/dis.rst
Doc/whatsnew/3.13.rst

index fda46d260bcb466b577c1e36b383643387956d2b..87d1bcdfaf3f1dd6265f712d04907cb45c552b59 100644 (file)
@@ -336,9 +336,10 @@ operation is being performed, so the intermediate analysis object isn't useful:
       Added the *show_caches* and *adaptive* parameters.
 
    .. versionchanged:: 3.13
-      The *show_caches* parameter is deprecated and has no effect. The *cache_info*
-      field of each instruction is populated regardless of its value.
-
+      The *show_caches* parameter is deprecated and has no effect. The iterator
+      generates the :class:`Instruction` instances with the *cache_info*
+      field populated (regardless of the value of *show_caches*) and it no longer
+      generates separate items for the cache entries.
 
 .. function:: findlinestarts(code)
 
index dfbeadce0eea27e1ab5b7562bf275c82f68fce87..a1d2a0d84e758118157ce1ff18344c17656fb24e 100644 (file)
@@ -706,6 +706,13 @@ dis
   the ``show_offsets`` parameter.
   (Contributed by Irit Katriel in :gh:`112137`.)
 
+* :meth:`~dis.get_instructions` no longer represents cache entries as
+  separate instructions. Instead, it returns them as part of the
+  :class:`~dis.Instruction`, in the new *cache_info* field. The
+  *show_caches* argument to :meth:`~dis.get_instructions` is
+  deprecated and no longer has any effect.
+  (Contributed by Irit Katriel in :gh:`112962`.)
+
 .. _whatsnew313-doctest:
 
 doctest