-
-
Notifications
You must be signed in to change notification settings - Fork 32k
UnicodeDecodeError
or SystemError
when using f-string
with lambda
and non-ASCII characters
#130618
New issue
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
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-parser
topic-unicode
type-bug
An unexpected behavior, bug, or error
Comments
It seems to be a parser bug. |
On it |
The problem was introduced by:
|
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
pablogsal
added a commit
that referenced
this issue
Feb 27, 2025
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
…python#130638) (cherry picked from commit e06bebb)
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
…strings (pythonGH-130638) (cherry picked from commit e06bebb) Co-authored-by: Pablo Galindo Salgado <[email protected]>
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
…strings (pythonGH-130638) (cherry picked from commit e06bebb) Co-authored-by: Pablo Galindo Salgado <[email protected]>
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
…strings (pythonGH-130638) (cherry picked from commit e06bebb) Co-authored-by: Pablo Galindo Salgado <[email protected]> Signed-off-by: Pablo Galindo <[email protected]>
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Feb 27, 2025
…strings (pythonGH-130638) (cherry picked from commit e06bebb) Co-authored-by: Pablo Galindo Salgado <[email protected]>
pablogsal
added a commit
that referenced
this issue
Mar 1, 2025
GH-130638) (#130642) (cherry picked from commit e06bebb) Signed-off-by: Pablo Galindo <[email protected]>
pablogsal
added a commit
that referenced
this issue
Mar 1, 2025
Thanks for the report @gaesa |
seehwan
pushed a commit
to seehwan/cpython
that referenced
this issue
Apr 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-parser
topic-unicode
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
When using an
f-string
in combination withlambda
functions that return non-ASCII characters, either aUnicodeDecodeError
or aSystemError
is raised, depending on the specific modification made to the code. These errors do not occur consistently, but rather vary based on how the lambdas and string content are altered.Steps to Reproduce
Run the code with
python <file.py>
, which triggers the following error:Expected Behavior
The code should execute without raising any errors.
Actual Behavior
The following behaviors are observed when making the specified modifications. Each of these cases is independent:
、
character from the first string (foo
): No error.、
characters from the first string:SystemError: Negative size passed to PyUnicode_New
.foo=
(i.e., not passingfoo
by keyword): No error.lambda:
(i.e., making either argument or both into astr
type instead of aCallable[[], str]
): No error.bar
): No error.Other Relevant Information
The bug does not reproduce in Python 3.13.1, but it does reproduce in Python 3.13.2 and 3.12.9.
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: