]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-129726: Break `gzip.GzipFile` reference loop (GH-130055) (#130670)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Feb 2025 08:28:14 +0000 (09:28 +0100)
committerGitHub <noreply@github.com>
Fri, 28 Feb 2025 08:28:14 +0000 (08:28 +0000)
commit500ea3b0ee04ee3589597dcbe6a2b9fb8251fc65
tree32c40a1e7a5cb78f71715efc44960989d96d8f88
parent107e08dfb18c7d752f8452dcc659f0225b1a25fa
[3.12] gh-129726: Break `gzip.GzipFile` reference loop (GH-130055) (#130670)

gh-129726: Break `gzip.GzipFile` reference loop (GH-130055)

A reference loop was resulting in the `fileobj` held by the `GzipFile`
being closed before the `GzipFile`.

The issue started with gh-89550 in 3.12, but was hidden in most cases
until 3.13 when gh-62948 made it more visible.
(cherry picked from commit 7f39137662f637518a74228286e7ec675fa4e27d)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Lib/gzip.py
Lib/test/test_gzip.py
Misc/NEWS.d/next/Library/2025-02-12-12-38-24.gh-issue-129726.jB0sxu.rst [new file with mode: 0644]