Skip to content

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Aug 2, 2025

@pablogsal pablogsal requested a review from lysnikolaou as a code owner August 2, 2025 22:10
@pablogsal pablogsal changed the title gh-13731: Fix incorrect treatment of format specs in raw fstrings gh-137314: Fix incorrect treatment of format specs in raw fstrings Aug 2, 2025
@pablogsal pablogsal added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Aug 2, 2025
Co-authored-by: Bénédikt Tran <[email protected]>
@pablogsal
Copy link
Member Author

@Yhg1s should we backport this to 3.12? is not a security fix certianly so my default would be 'no' but my guess is that it will make maintaining linterns a pain in this area if the behaviour is different.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

@pablogsal pablogsal merged commit 0153d82 into python:main Aug 3, 2025
45 checks passed
@pablogsal pablogsal deleted the gh-137314 branch August 3, 2025 16:10
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 3, 2025
…ngs (pythonGH-137328)

(cherry picked from commit 0153d82)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 3, 2025
…ngs (pythonGH-137328)

(cherry picked from commit 0153d82)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Aug 3, 2025

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

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Aug 3, 2025
@bedevere-app
Copy link

bedevere-app bot commented Aug 3, 2025

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

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Aug 3, 2025
pablogsal added a commit to miss-islington/cpython that referenced this pull request Aug 3, 2025
pablogsal added a commit that referenced this pull request Aug 3, 2025
…ings (GH-137328) (#137344)

gh-137314: Fix incorrect treatment of format specs in raw fstrings (GH-137328)
(cherry picked from commit 0153d82)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
pablogsal added a commit that referenced this pull request Aug 3, 2025
…ings (GH-137328) (#137345)

gh-137314: Fix incorrect treatment of format specs in raw fstrings (GH-137328)
(cherry picked from commit 0153d82)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
@Yhg1s
Copy link
Member

Yhg1s commented Aug 4, 2025

@Yhg1s should we backport this to 3.12? is not a security fix certianly so my default would be 'no' but my guess is that it will make maintaining linterns a pain in this area if the behaviour is different.

Linters will probably have to consider earlier 3.12 releases anyway (at least on Windows and probably macOS, since we won't be building installers with this fix), and yeah, it's not a security fix. I don't see a particular compelling reason to backport it unless we want to reconsider the whole security-fix-only idea.

@dylwil3
Copy link
Contributor

dylwil3 commented Aug 4, 2025

@Yhg1s should we backport this to 3.12? is not a security fix certianly so my default would be 'no' but my guess is that it will make maintaining linterns a pain in this area if the behaviour is different.

Linters will probably have to consider earlier 3.12 releases anyway (at least on Windows and probably macOS, since we won't be building installers with this fix), and yeah, it's not a security fix. I don't see a particular compelling reason to backport it unless we want to reconsider the whole security-fix-only idea.

Happy to special case, but just for clarification this was a regression in 3.12, not something that held in 3.11 - so the behavior in the linter would not be "3.12 and earlier do this..." but rather "only for 3.12 do this".

@picnixz
Copy link
Member

picnixz commented Aug 4, 2025

What we meant by earlier releases is the patch version. We only release sources for security-only branches, and usually it's only Linux distributions that pick them up to so that users can upgrade their system-wide installation from their package manager. So Windows is likely to have Python 3.12.N without the fix while Linux would have the fix in 3.12.(N+1).

Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…w fstrings (pythonGH-137328) (python#137344)

pythongh-137314: Fix incorrect treatment of format specs in raw fstrings (pythonGH-137328)
(cherry picked from commit 0153d82)

Co-authored-by: Pablo Galindo Salgado <[email protected]>
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.

5 participants