Skip to content

Remove deprecated and unused TarInfo.tarfile attribute for 3.16 #149634

Closed

Description

@sobolevn

Feature or enhancement

Refs #115256
Refs #115257

This code is scheduled to be removed in 3.16:

cpython/Lib/tarfile.py

Lines 945 to 961 in a2c1657

@property
def tarfile(self):
import warnings
warnings.warn(
'The undocumented "tarfile" attribute of TarInfo objects '
+ 'is deprecated and will be removed in Python 3.16',
DeprecationWarning, stacklevel=2)
return self._tarfile
@tarfile.setter
def tarfile(self, tarfile):
import warnings
warnings.warn(
'The undocumented "tarfile" attribute of TarInfo objects '
+ 'is deprecated and will be removed in Python 3.16',
DeprecationWarning, stacklevel=2)
self._tarfile = tarfile

Linked PRs

Activity

  1. self-assigned this
    on May 10, 2026
  2. added
    type-featureA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directory
    on May 10, 2026
  3. added a commit that references this issue on May 11, 2026
  4. changed the title [-]Remove deprecated and unused `Tarfile.tarfile` attribute for 3.16[/-] [+]Remove deprecated and unused `TarInfo.tarfile` attribute for 3.16[/+] on May 11, 2026
  5. added a commit that references this issue on May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions