This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: show_caches option affects code positions reported by dis.get_instructions(...)
Type: behavior Stage: patch review
Components: Versions: Python 3.11
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: 15r10nk, brandtbucher
Priority: normal Keywords: patch

Created on 2022-04-05 19:47 by 15r10nk, last changed 2022-04-11 14:59 by admin.

File name Uploaded Description Edit 15r10nk, 2022-04-05 19:47
Pull Requests
URL Status Linked Edit
PR 32406 open 15r10nk, 2022-04-07 20:40
Messages (3)
msg416810 - (view) Author: 15r10nk (15r10nk) * Date: 2022-04-05 19:47
The Instructions reported by dis.get_instructions(...) and dis.Bytecode(...) have different positions depending on the value of their show_caches argument. reproduces the problem.
msg416828 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2022-04-05 23:01
Nice catch. The fix should be pretty simple: just move this line...

...up to the top of the for loop.

Are you interested in working on this?
msg416944 - (view) Author: 15r10nk (15r10nk) * Date: 2022-04-07 20:52
I moved the line.
Is there anything else required? unittests?
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91389
2022-04-07 20:52:4915r10nksetmessages: + msg416944
2022-04-07 20:40:0115r10nksetkeywords: + patch
stage: patch review
pull_requests: + pull_request30430
2022-04-05 23:01:52brandtbuchersetmessages: + msg416828
2022-04-05 22:53:45brandtbuchersetnosy: + brandtbucher
2022-04-05 19:47:2415r10nkcreate