cpython/Misc/NEWS.d/next/Library/2024-02-10-17-18-49.gh-issue-115256.41Fy9P.rst

5 lines
344 B
ReStructuredText

Added DeprecationWarning when accessing the tarfile attribute of TarInfo
objects. The attribute is never used internally and is only attached to
TarInfos when the tarfile is opened in write-mode, not read-mode. The
attribute creates an unnecessary reference cycle which may cause
corruption when not closing the handle after writing a tarfile.