mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Deprecate TarInfo.tarfile attribute (#13894)
This commit is contained in:
+11
-2
@@ -7,7 +7,7 @@ from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from gzip import _ReadableFileobj as _GzipReadableFileobj, _WritableFileobj as _GzipWritableFileobj
|
||||
from types import TracebackType
|
||||
from typing import IO, ClassVar, Literal, Protocol, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
from typing_extensions import Self, TypeAlias, deprecated
|
||||
|
||||
__all__ = [
|
||||
"TarFile",
|
||||
@@ -622,7 +622,6 @@ class TarInfo:
|
||||
offset: int
|
||||
offset_data: int
|
||||
sparse: bytes | None
|
||||
tarfile: TarFile | None
|
||||
mode: int
|
||||
type: bytes
|
||||
linkname: str
|
||||
@@ -632,6 +631,16 @@ class TarInfo:
|
||||
gname: str
|
||||
pax_headers: Mapping[str, str]
|
||||
def __init__(self, name: str = "") -> None: ...
|
||||
if sys.version_info >= (3, 13):
|
||||
@property
|
||||
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.16")
|
||||
def tarfile(self) -> TarFile | None: ...
|
||||
@tarfile.setter
|
||||
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.16")
|
||||
def tarfile(self) -> None: ...
|
||||
else:
|
||||
tarfile: TarFile | None
|
||||
|
||||
@classmethod
|
||||
def frombuf(cls, buf: bytes | bytearray, encoding: str, errors: str) -> Self: ...
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user