Feature or enhancement
The defaulttimeout in socketmodule.c is shared, mutable state:
In the free-threaded build, we should use relaxed atomic operations to access defaulttimeout to avoid data races. This probably requires adding wrappers for 64-bit relaxed atomic load and stores to https://github.com/python/cpython/blob/main/Include/internal/pycore_pyatomic_ft_wrappers.h. Note that _PyTime_t is a typedef for int64_t.
For context, here is a similar change from nogil-3.12, but note that defaulttimeout is now part of the module state:
Linked PRs