mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
[3.13] gh-125268: Use static string for "1e309" in AST (GH-125272) (GH-125280)
When formatting the AST as a string, infinite values are replaced by
1e309, which evaluates to infinity. The initialization of this string
replacement was not thread-safe in the free threading build.
(cherry picked from commit 427dcf24de
)
This commit is contained in:
parent
f27ba61e56
commit
4b55d53316
9 changed files with 4813 additions and 4820 deletions
2
Python/Python-ast.c
generated
2
Python/Python-ast.c
generated
|
@ -279,8 +279,6 @@ void _PyAST_Fini(PyInterpreterState *interp)
|
|||
Py_CLEAR(state->vararg);
|
||||
Py_CLEAR(state->withitem_type);
|
||||
|
||||
Py_CLEAR(_Py_INTERP_CACHED_OBJECT(interp, str_replace_inf));
|
||||
|
||||
state->finalized = 1;
|
||||
state->once = (_PyOnceFlag){0};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue