gh-116738: Make grp module thread-safe (GH-135434)
Make grp module methods getgrgid() and getgrnam() thread-safe when the GIL is disabled and getgrgid_r()/getgrnam_r() C APIs are not available.
---------
(cherry picked from commit 9363703bd3)
Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
gh-135557: use atomic stores in `heapq` operations in free-threading (GH-135601)
(cherry picked from commit 13cac83347)
Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com>
Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled.
(cherry picked from commit a58026a5e3)
Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: mpage <mpage@meta.com>