Skip to content

Commit 770f3c1

Browse files
authored
gh-114616: Improve docs regarding changes to caches representation in dis (#120033)
1 parent 69b3e8e commit 770f3c1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Doc/library/dis.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,10 @@ operation is being performed, so the intermediate analysis object isn't useful:
336336
Added the *show_caches* and *adaptive* parameters.
337337

338338
.. versionchanged:: 3.13
339-
The *show_caches* parameter is deprecated and has no effect. The *cache_info*
340-
field of each instruction is populated regardless of its value.
341-
339+
The *show_caches* parameter is deprecated and has no effect. The iterator
340+
generates the :class:`Instruction` instances with the *cache_info*
341+
field populated (regardless of the value of *show_caches*) and it no longer
342+
generates separate items for the cache entries.
342343

343344
.. function:: findlinestarts(code)
344345

Doc/whatsnew/3.13.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,13 @@ dis
706706
the ``show_offsets`` parameter.
707707
(Contributed by Irit Katriel in :gh:`112137`.)
708708

709+
* :meth:`~dis.get_instructions` no longer represents cache entries as
710+
separate instructions. Instead, it returns them as part of the
711+
:class:`~dis.Instruction`, in the new *cache_info* field. The
712+
*show_caches* argument to :meth:`~dis.get_instructions` is
713+
deprecated and no longer has any effect.
714+
(Contributed by Irit Katriel in :gh:`112962`.)
715+
709716
.. _whatsnew313-doctest:
710717

711718
doctest

0 commit comments

Comments
 (0)