]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-150077: Fix fileobj leak in `tarfile.TarFile.zstopen` on `BaseException` (GH-150080)
authorstevens <lipengyu@kylinos.cn>
Wed, 15 Jul 2026 17:53:23 +0000 (01:53 +0800)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2026 17:53:23 +0000 (10:53 -0700)
commit681477de459bd12ab2429669aa6d52cbed83c018
tree12a6ba7a171010acd18aae7cccd993e995f354cb
parent93beea7e5a3c5a03253e6812a06f2497505aeb30
gh-150077: Fix fileobj leak in `tarfile.TarFile.zstopen` on `BaseException` (GH-150080)

This is one of those times when a bare `except` is appropriate.
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS.d/next/Library/2026-05-19-18-25-00.gh-issue-150077.zstopen-close.rst [new file with mode: 0644]