FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.10] gh-101400: Fix incorrect lineno in exception message on contin… by corona10 · Pull Request #101448 · python/cpython · GitHub

/ cpython Public

[3.10] gh-101400: Fix incorrect lineno in exception message on contin… - #101448

Merged
corona10 merged 1 commit into
python:3.10from
corona10:backport-e867c1b-3.10
Jan 31, 2023
Merged

corona10 merged 1 commit into
python:3.10from
corona10:backport-e867c1b-3.10

Conversation

corona10 commented Jan 31, 2023 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

…ue/break which are not in a loop (GH-101413).

(cherry picked from commit e867c1b)

Co-authored-by: Dong-hee Na donghee.na@python.org

…continue/break which are not in a loop (pythonGH-101413).

(cherry picked from commit e867c1b)

Co-authored-by: Dong-hee Na <donghee.na@python.org>

corona10 commented Jan 31, 2023 •
edited
Loading

Copy link
Copy Markdown
Member Author

cpython/Python/compile.c

Lines 1841 to 1846 in 17b038c

ADDOP(c, POP_TOP);
/* The exit block should appear to execute after the
* statement causing the unwinding, so make the unwinding
* instruction artificial */
c->u->u_lineno = -1;
return 1;

@iritkatriel

For 3.10, it only modifies the u_lineno, so just restoring the u_lineno will be enough WDYT?

corona10 merged commit 740050a into python:3.10 Jan 31, 2023
corona10 deleted the backport-e867c1b-3.10 branch January 31, 2023 14:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL