Skip to content

gh-129958: New syntax error in format spec applies to both f-strings and t-strings - #135570

Merged
lysnikolaou merged 5 commits into
python:mainfrom
dylwil3:fix-issue-129958
Jun 26, 2025
Merged

gh-129958: New syntax error in format spec applies to both f-strings and t-strings#135570
lysnikolaou merged 5 commits into
python:mainfrom
dylwil3:fix-issue-129958

Conversation

@dylwil3

@dylwil3dylwil3 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

Closes#129958
(again)

And I think requires backport to 3.14.

Let me know if this warrants a test in test_tstring.py and/or a blurb!

@python-cla-bot

python-cla-botBot commented Jun 16, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@tomasr8tomasr8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let me know if this warrants a test in test_tstring.py and/or a blurb!

I think it warrants both :)

Comment threadParser/lexer/lexer.c Outdated
@bedevere-app

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@lysnikolaoulysnikolaou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a minor formatting nit and it's good to go!

Comment threadLib/test/test_tstring.py Outdated
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>

@lysnikolaoulysnikolaou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks @dylwil3!

@lysnikolaou
lysnikolaou merged commit fb9e292 into python:mainJun 26, 2025
71 of 73 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @dylwil3 for the PR, and @lysnikolaou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 26, 2025
…rings and t-strings (pythonGH-135570)
(cherry picked from commit fb9e292)
Co-authored-by: Dylan <dylwil3@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@bedevere-app

Copy link
Copy Markdown

GH-135982 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Jun 26, 2025
@dylwil3
dylwil3 deleted the fix-issue-129958 branch June 26, 2025 14:36
lysnikolaou added a commit that referenced this pull request Jun 26, 2025
…trings and t-strings (GH-135570) (#135982)
(cherry picked from commit fb9e292)
Co-authored-by: Dylan <dylwil3@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
AndPuQing pushed a commit to AndPuQing/cpython that referenced this pull request Jul 11, 2025
…rings and t-strings (python#135570)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…rings and t-strings (python#135570)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…rings and t-strings (python#135570)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…rings and t-strings (python#135570)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Sign up for freeto 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.

Vague behavior when single quoted f-string format_spec contains line break

4 participants

@dylwil3@tomasr8@lysnikolaou@ZeroIntensity