diff options
author | Sam Gross <colesbury@gmail.com> | 2024-10-10 20:21:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 20:21:29 (GMT) |
commit | 427dcf24de4e06d239745d74d08c4b2e541dca5a (patch) | |
tree | 37a7ca3937862498b957402323c1a29195ce11eb /Python/Python-ast.c | |
parent | bb594e801b6a84823badbb85b88f0fc8b221d7bf (diff) | |
download | cpython-427dcf24de4e06d239745d74d08c4b2e541dca5a.zip cpython-427dcf24de4e06d239745d74d08c4b2e541dca5a.tar.gz cpython-427dcf24de4e06d239745d74d08c4b2e541dca5a.tar.bz2 |
gh-125268: Use static string for "1e309" in AST (#125272)
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.
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 89c52b9..38d74b4 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -281,8 +281,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}; } |