GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-107932: Fix dis module for bytecode that does not have an associated source line by CorvinM · Pull Request #107988 · python/cpython

Conversation

@CorvinM

@CorvinM CorvinM commented Aug 15, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

  • Issue: dis.dis() reports line numbers where there are none. #107932

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
CorvinM added 2 commits August 15, 2023 22:50
@CorvinM
Fix dis module for bytecode that does not have an associated source line
751f57f
fixes python#107932
@CorvinM
Add to Misc/ACKS
a98900e
@ghost

ghost commented Aug 15, 2023 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot mentioned this pull request Aug 15, 2023
dis.dis() reports line numbers where there are none. #107932
Closed
@bedevere-bot bedevere-bot added the awaiting review label Aug 15, 2023
@bedevere-bot

bedevere-bot commented Aug 15, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it
📜🤖 Added by blurb_it.
080a86c
markshannon
markshannon requested changes Aug 18, 2023
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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 of False as a special value for starts_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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/dis.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting review label Aug 18, 2023
@bedevere-bot

bedevere-bot commented Aug 18, 2023

Copy link
Copy Markdown

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 phrase I 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Aug 18, 2023
CorvinM added 5 commits August 18, 2023 20:21
@CorvinM
Split line_number from starts_line
89cd00f
@CorvinM
WIP test_dis line_number update
054c55a
@CorvinM
WIP Merge branch 'main' into pythongh-107932
c8aaa8d
@CorvinM
Update test_dis for line_number
20d3d0d
@CorvinM
Update dis docs with line_number changes
8f1dc3e
@CorvinM

CorvinM commented Aug 18, 2023

Copy link
Copy Markdown
Contributor Author

@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?)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Aug 18, 2023
@bedevere-bot

bedevere-bot commented Aug 18, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from markshannon August 18, 2023 22:04
markshannon
markshannon approved these changes Aug 25, 2023
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks, looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Aug 25, 2023
@markshannon
markshannon merged commit 24aa249 into python:main Aug 25, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Aug 25, 2023
@erlend-aasland

erlend-aasland commented Aug 25, 2023

Copy link
Copy Markdown
Contributor

main has been broken since this was merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland mentioned this pull request Aug 25, 2023
gh-108364: Simplify quoting values and identifiers in sqlite3's iterdump() #108472
Merged
@markshannon

markshannon commented Aug 25, 2023

Copy link
Copy Markdown
Member

#108478

CorvinM reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@markshannon markshannon markshannon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

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.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@CorvinM @bedevere-bot @erlend-aasland @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.