You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix thread-safety of interpreter cached object str_replace_inf (free threading) #125268
We have a number of per-interpreter cached objects. Some of these are lazily initialized in a way that is not thread-safe in the free threading build. (See #125221, for example).
We should go through the remaining ones and make sure they are thread-safe.
EDIT: The only remaining field is str_replace_inf. Accesses to type_slots_pname and type_slots_ptrs are protected by a lock and the TypeVar fields are initialized once early on with other types.
changed the title [-]Thread-safety of interpreter cached objects (free threading)[/-][+]Fix thread-safety of interpreter cached object `str_replace_inf` (free threading)[/+]on Oct 10, 2024
Activity
colesbury commentedon Oct 10, 2024
The "TypeVar and related types" fields are initialized during interpreter start-up, so they're fine.
pythongh-125268: Use static string for "1e309" in AST
[-]Thread-safety of interpreter cached objects (free threading)[/-][+]Fix thread-safety of interpreter cached object `str_replace_inf` (free threading)[/+]gh-125268: Use static string for "1e309" in AST (#125272)
[3.13] pythongh-125268: Use static string for "1e309" in AST (pythonG…
[3.13] gh-125268: Use static string for "1e309" in AST (GH-125272) (G…