Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a653562

Browse files
[3.13] gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033) (#120079)
gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033) (cherry picked from commit 770f3c1) Co-authored-by: Irit Katriel <[email protected]>
1 parent 4ac0ccf commit a653562

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
@@ -694,6 +694,13 @@ dis
694694
the ``show_offsets`` parameter.
695695
(Contributed by Irit Katriel in :gh:`112137`.)
696696

697+
* :meth:`~dis.get_instructions` no longer represents cache entries as
698+
separate instructions. Instead, it returns them as part of the
699+
:class:`~dis.Instruction`, in the new *cache_info* field. The
700+
*show_caches* argument to :meth:`~dis.get_instructions` is
701+
deprecated and no longer has any effect.
702+
(Contributed by Irit Katriel in :gh:`112962`.)
703+
697704
.. _whatsnew313-doctest:
698705

699706
doctest

0 commit comments

Comments
 (0)