Skip to content

[3.15] gh-157778: Include opening brace line in multiline f-string errors (GH-157779) - #158047

Merged
pablogsal merged 1 commit into
python:3.15from
pablogsal:backport-157779-3.15
Sep 24, 2026
Merged

pablogsal merged 1 commit into
python:3.15from
pablogsal:backport-157779-3.15

Conversation

@pablogsal

@pablogsal pablogsal commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Backport #157779 to Python 3.15. The tokenizer code is still in Parser/lexer/lexer.c on this branch, so the conflict is resolved there using the 3.15 formatted-string depth fields to find the opening brace's line. The original tests and NEWS entry are included.

I built a debug interpreter and ran ./python -m test test_fstring successfully. AI assistance was used to resolve and verify the backport.

@pablogsal
pablogsal enabled auto-merge (squash) September 24, 2026 00:26
@pablogsal
pablogsal merged commit 3b9fa19 into python:3.15 Sep 24, 2026
56 checks passed
@pablogsal
pablogsal deleted the backport-157779-3.15 branch September 24, 2026 00:59
@uriesmooth

uriesmooth commented Sep 24, 2026 via email

Copy link
Copy Markdown

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.

2 participants