@@ -7,7 +7,7 @@ from collections.abc import Callable, Iterable, Iterator, Mapping
77from gzip import _ReadableFileobj as _GzipReadableFileobj , _WritableFileobj as _GzipWritableFileobj
88from types import TracebackType
99from typing import IO , ClassVar , Literal , Protocol , overload
10- from typing_extensions import Self , TypeAlias
10+ from typing_extensions import Self , TypeAlias , deprecated
1111
1212__all__ = [
1313 "TarFile" ,
@@ -622,7 +622,6 @@ class TarInfo:
622622 offset : int
623623 offset_data : int
624624 sparse : bytes | None
625- tarfile : TarFile | None
626625 mode : int
627626 type : bytes
628627 linkname : str
@@ -632,6 +631,16 @@ class TarInfo:
632631 gname : str
633632 pax_headers : Mapping [str , str ]
634633 def __init__ (self , name : str = "" ) -> None : ...
634+ if sys .version_info >= (3 , 13 ):
635+ @property
636+ @deprecated ("Deprecated in Python 3.13; removal scheduled for Python 3.16" )
637+ def tarfile (self ) -> TarFile | None : ...
638+ @tarfile .setter
639+ @deprecated ("Deprecated in Python 3.13; removal scheduled for Python 3.16" )
640+ def tarfile (self ) -> None : ...
641+ else :
642+ tarfile : TarFile | None
643+
635644 @classmethod
636645 def frombuf (cls , buf : bytes | bytearray , encoding : str , errors : str ) -> Self : ...
637646 @classmethod
0 commit comments