gh-112075: Dictionary global version counter should use atomic increments by DinoV · Pull Request #114568 · python/cpython

I think this is fine for now, especially in the interest of getting to the point where we can run the test suite with the GIL disabled, but we will want to avoid contention on the global version counter.

The strategy in nogil and nogil-3.12 was to reserve something like the next 256 versions (atomically) and then serve the next version requests from thread-local state.