]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116931: Add fileobj parameter check for Tarfile.addfile (GH-117988)
authorlyc8503 <me@lyc8503.site>
Fri, 19 Apr 2024 11:41:51 +0000 (19:41 +0800)
committerGitHub <noreply@github.com>
Fri, 19 Apr 2024 11:41:51 +0000 (11:41 +0000)
commit15b3555e4a47ec925c965778a415dc11f0f981fd
tree9699f4644620c576afa6d727c776b3ac09b608f9
parent3e7d990a09f0928050b2b0c85f724c2bce13fcbb
gh-116931: Add fileobj parameter check for Tarfile.addfile (GH-117988)

Tarfile.addfile now throws an ValueError when the user passes
in a non-zero size tarinfo but does not provide a fileobj,
instead of writing an incomplete entry.
Doc/library/tarfile.rst
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS.d/next/Library/2024-04-17-21-28-24.gh-issue-116931._AS09h.rst [new file with mode: 0644]