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-127321: Avoid stopping at an opcode without an associated line number for breakpoint() by gaogaotiantian · Pull Request #127457 · python/cpython

Conversation

@gaogaotiantian

@gaogaotiantian gaogaotiantian commented Nov 30, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

If we are tracing opcodes (which only happen when we do set_trace() for now), we just step instr again if there's no line number.

  • Issue: Setting f_trace_opcodes to True can lead to f_lineno being removed in some cases (using breakpoint()/pdb.set_trace()) #127321

Sorry, something went wrong.

Uh oh!

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

All reactions
@gaogaotiantian
Avoid stopping at an opcode without an associated line number for
7d8ada3
breakpoint()
@bedevere-app bedevere-app Bot mentioned this pull request Nov 30, 2024
Setting f_trace_opcodes to True can lead to f_lineno being removed in some cases (using breakpoint()/pdb.set_trace()) #127321
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Nov 30, 2024
@gaogaotiantian
gaogaotiantian requested a review from iritkatriel November 30, 2024 21:44
blurb-it Bot and others added 2 commits November 30, 2024 21:46
@blurb-it
📜🤖 Added by blurb_it.
ea6e6bb
@gaogaotiantian
Update 2024-11-30-21-46-15.gh-issue-127321.M78fBv.rst
bfe19a7
iritkatriel
iritkatriel approved these changes Dec 1, 2024
View reviewed changes

@iritkatriel iritkatriel 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.

Nice solution.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Dec 1, 2024
@gaogaotiantian
gaogaotiantian merged commit 1bc4f07 into python:main Dec 1, 2024
@gaogaotiantian
gaogaotiantian deleted the breakpoint-lineno branch December 1, 2024 16:57
@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 1, 2024
@gaogaotiantian

gaogaotiantian commented Dec 1, 2024

Copy link
Copy Markdown
Member Author

Ah, @iritkatriel do you think we should backport this to 3.13? It's a bit of behavior change but only happens in rare cases. If not, we should protect all the access to f_lineno because we don't want pdb to crash when it assumes that's a number.

All reactions

Sorry, something went wrong.

Uh oh!

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

@iritkatriel

iritkatriel commented Dec 1, 2024

Copy link
Copy Markdown
Member

I think this is a bug fix, so yes.

All reactions

Sorry, something went wrong.

Uh oh!

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

@gaogaotiantian gaogaotiantian added the needs backport to 3.13 only security fixes label Dec 1, 2024
@miss-islington-app

miss-islington-app Bot commented Dec 1, 2024

Copy link
Copy Markdown

Thanks @gaogaotiantian for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Dec 1, 2024

Copy link
Copy Markdown

Sorry, @gaogaotiantian, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1bc4f076d193ad157bdc69a1d62685a15f95113f 3.13
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned gaogaotiantian Dec 1, 2024
gaogaotiantian added a commit to gaogaotiantian/cpython that referenced this pull request Dec 1, 2024
@gaogaotiantian
[3.13] pythongh-127321: Avoid stopping at an opcode without an associ…
4f136c9
…ated line number for breakpoint() (pythonGH-127457)

(cherry picked from commit 1bc4f07)

Co-authored-by: Tian Gao <[email protected]>
@gaogaotiantian gaogaotiantian mentioned this pull request Dec 1, 2024
[3.13] gh-127321: Avoid stopping at an opcode without an associated line number for breakpoint() (GH-127457) #127487
Merged
@bedevere-app

bedevere-app Bot commented Dec 1, 2024

Copy link
Copy Markdown

GH-127487 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Dec 1, 2024
@bedevere-app

bedevere-app Bot commented Dec 1, 2024

Copy link
Copy Markdown

GH-127487 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@iritkatriel iritkatriel added the type-bug An unexpected behavior, bug, or error label Dec 1, 2024
gaogaotiantian added a commit that referenced this pull request Dec 1, 2024
@gaogaotiantian
[3.13] gh-127321: Avoid stopping at an opcode without an associated l…
dd2ad70
…ine number for breakpoint() (GH-127457) (#127487)

(cherry picked from commit 1bc4f07)
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 2, 2024
@gaogaotiantian @picnixz
pythongh-127321: Avoid stopping at an opcode without an associated li…
854dff2
…ne number for breakpoint() (python#127457)
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
@gaogaotiantian @srinivasreddy
pythongh-127321: Avoid stopping at an opcode without an associated li…
e9f9c29
…ne number for breakpoint() (python#127457)
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
@gaogaotiantian @ebonnal
pythongh-127321: Avoid stopping at an opcode without an associated li…
34a77ba
…ne number for breakpoint() (python#127457)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel approved these changes

Uh oh!

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

Assignees

@gaogaotiantian gaogaotiantian

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

2 participants

@gaogaotiantian @iritkatriel
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.