platform, tarfile, io: Python 3.13 updates (#12056)

This commit is contained in:
Amin Alaee
2024-05-29 14:37:26 +02:00
committed by GitHub
parent b2f6e5221b
commit b45456739a
4 changed files with 63 additions and 23 deletions

View File

@@ -142,22 +142,43 @@ class TarFile:
errorlevel: int | None
offset: int # undocumented
extraction_filter: _FilterFunction | None
def __init__(
self,
name: StrOrBytesPath | None = None,
mode: Literal["r", "a", "w", "x"] = "r",
fileobj: _Fileobj | None = None,
format: int | None = None,
tarinfo: type[TarInfo] | None = None,
dereference: bool | None = None,
ignore_zeros: bool | None = None,
encoding: str | None = None,
errors: str = "surrogateescape",
pax_headers: Mapping[str, str] | None = None,
debug: int | None = None,
errorlevel: int | None = None,
copybufsize: int | None = None, # undocumented
) -> None: ...
if sys.version_info >= (3, 13):
stream: bool
def __init__(
self,
name: StrOrBytesPath | None = None,
mode: Literal["r", "a", "w", "x"] = "r",
fileobj: _Fileobj | None = None,
format: int | None = None,
tarinfo: type[TarInfo] | None = None,
dereference: bool | None = None,
ignore_zeros: bool | None = None,
encoding: str | None = None,
errors: str = "surrogateescape",
pax_headers: Mapping[str, str] | None = None,
debug: int | None = None,
errorlevel: int | None = None,
copybufsize: int | None = None, # undocumented
stream: bool = False,
) -> None: ...
else:
def __init__(
self,
name: StrOrBytesPath | None = None,
mode: Literal["r", "a", "w", "x"] = "r",
fileobj: _Fileobj | None = None,
format: int | None = None,
tarinfo: type[TarInfo] | None = None,
dereference: bool | None = None,
ignore_zeros: bool | None = None,
encoding: str | None = None,
errors: str = "surrogateescape",
pax_headers: Mapping[str, str] | None = None,
debug: int | None = None,
errorlevel: int | None = None,
copybufsize: int | None = None, # undocumented
) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(
self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None