Skip to content

gh-162622: fix ast.unparse for literal braces in format specifiers - #162623

Merged
StanFromIreland merged 2 commits into
python:mainfrom
tonghuaroot:ast-unparse-format-spec-braces
Nov 25, 2026
Merged

StanFromIreland merged 2 commits into
python:mainfrom
tonghuaroot:ast-unparse-format-spec-braces

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

ast.unparse now writes literal braces in format specifiers as hex escapes so that parsing the result preserves the original syntax tree.

closes #162622.

StanFromIreland

This comment was marked as low quality.

@StanFromIreland

Copy link
Copy Markdown
Member

Oh no sorry, I didn't rebuild.

@StanFromIreland StanFromIreland added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 25, 2026
@StanFromIreland
StanFromIreland merged commit 8c68eb4 into python:main Nov 25, 2026
66 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Nov 25, 2026

Copy link
Copy Markdown

GH-162626 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 25, 2026
@bedevere-app

bedevere-app Bot commented Nov 25, 2026

Copy link
Copy Markdown

GH-162627 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 Nov 25, 2026
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.

ast.unparse can emit invalid syntax for literal braces in format specifiers

2 participants