Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-107932: Fix dis module for bytecode that does not have an associated source line#107988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markshannon merged 8 commits intopython:mainfromCorvinM:gh-107932
Aug 25, 2023

Conversation

@CorvinM
Copy link
Contributor

@CorvinMCorvinM commentedAug 15, 2023
edited
Loading

Fix dis module for bytecode that does not have an associated source line.
fixes#107932

This does change behavior of many of the dis.py public functions to display lines with no source line mapping as such.
At the very least it changes:
findlinestarts - now returns starts of bytecode blocks that dont have a source line with lineno=None
dis/disassemble/distb/disco - now separates and labels lineno=None bytecode blocks, previously it lumped them into the previous block (see#107932)
get_instructions & Instruction - Instruction objects now have starts_line=False to indicate that the instruction does not start a line.

@ghost
Copy link

ghost commentedAug 15, 2023
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

Copy link
Member

@markshannonmarkshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for working on this.
The changes look correct, but the use ofFalse as a special value forstarts_line is a bit hard to follow.

Lib/test/test_dis.py is an endless source of merge conflicts, so I'll try merge ASAP after you've made the changes.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@CorvinM
Copy link
ContributorAuthor

@markshannon Thanks for the quick review! I have made the requested changes; please review again. I have also updated the docs to reflect the changes and resolved the merge conflict (for now). I've listed the changes in the docs as happening in 3.13 (is this the correct procedure for the project?)

@bedevere-bot
Copy link

Thanks for making the requested changes!

@markshannon: please review the changes made to this pull request.

Copy link
Member

@markshannonmarkshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks, looks good.

@erlend-aasland
Copy link
Contributor

main has been broken since this was merged.

@markshannon
Copy link
Member

#108478

CorvinM reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@markshannonmarkshannonmarkshannon approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

dis.dis() reports line numbers where there are none.

4 participants

@CorvinM@bedevere-bot@erlend-aasland@markshannon

[8]ページ先頭

©2009-2025 Movatter.jp