]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-129726: Break `gzip.GzipFile` reference loop (GH-130055) (#130669)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 28 Feb 2025 08:32:44 +0000 (09:32 +0100)
committerGitHub <noreply@github.com>
Fri, 28 Feb 2025 08:32:44 +0000 (08:32 +0000)
commitad97027e9b010d07272aeb8b3151bc59f710f367
tree3fa54113d1a591d840cfb38795a96e4d0fa535b0
parent125ca028664ce72556e3983b57f521a118c4e677
[3.13] gh-129726: Break `gzip.GzipFile` reference loop (GH-130055) (#130669)

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]