We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A DeprecationWarning is emitted when escaping a curly brace in an f-string. The correct warning is a SyntaxWarning as of Python 3.12.
DeprecationWarning
SyntaxWarning
cpython on test-fstring-syntaxwarnings [$] via C v14.0.3-clang via 🐍 pyenv 3.11.3 took 15s ❯ ./python.exe Python 3.13.0a0 (heads/main:155577de1b, Jun 20 2023, 13:50:50) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '\h' <stdin>:1: SyntaxWarning: invalid escape sequence '\h' '\\h' >>> f'\h' <stdin>:1: SyntaxWarning: invalid escape sequence '\h' '\\h' >>> '\{' <stdin>:1: SyntaxWarning: invalid escape sequence '\{' '\\{' >>> f'\{{' <stdin>:1: DeprecationWarning: invalid escape sequence '\{' <stdin>:1: SyntaxWarning: invalid escape sequence '\{' '\\{'
The text was updated successfully, but these errors were encountered:
test_fstring
pythongh-105938: Emit a SyntaxWarning for escaped braces in an f-string
533252e
e25dbb3
gh-105938: Emit a SyntaxWarning for escaped braces in an f-string (#1…
6586cee
…05939)
pythongh-105938: Emit a SyntaxWarning for escaped braces in an f-stri…
87056af
…ng (pythonGH-105939) (cherry picked from commit 6586cee) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
[3.12] gh-105938: Emit a SyntaxWarning for escaped braces in an f-str…
fea0d2f
…ing (GH-105939) (#105941) (cherry picked from commit 6586cee) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
lysnikolaou
No branches or pull requests
Bug report
A
DeprecationWarning
is emitted when escaping a curly brace in an f-string. The correct warning is aSyntaxWarning
as of Python 3.12.Linked PRs
The text was updated successfully, but these errors were encountered: