mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
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.
This commit is contained in:
Generated
-2
@@ -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};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user