]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116738: Make zlib module thread-safe (gh-142432)
authorAlper <alperyoney@fb.com>
Fri, 12 Dec 2025 18:14:42 +0000 (10:14 -0800)
committerGitHub <noreply@github.com>
Fri, 12 Dec 2025 18:14:42 +0000 (13:14 -0500)
commit1eddef81930ad9f7e2f411f153c35af16a6edf14
treebd2b63a0c0a8fc23aeca305eed135a0ef2f50c21
parent40ac3a9343e9653ad5a15b06741e55f67322eeb2
gh-116738: Make zlib module thread-safe (gh-142432)

Makes the zlib module thread-safe free-threading build. Even though operations
are protected by locks, attributes exposed via PyMemberDef (eof, needs_input,
unused_data, unconsumed_tail) should still be stored atomically within locked
sections, since they can be read without acquiring the lock.
Lib/test/test_free_threading/test_zlib.py [new file with mode: 0644]
Misc/NEWS.d/next/Core_and_Builtins/2025-12-08-14-14-40.gh-issue-116738.x7aaBF.rst [new file with mode: 0644]
Modules/zlibmodule.c