Add several version-dependent default values to parameters in the stdlib (#9631)

This commit is contained in:
Alex Waygood
2023-01-31 01:21:39 +00:00
committed by GitHub
parent 81463b9995
commit a6919227be
5 changed files with 28 additions and 8 deletions

View File

@@ -354,7 +354,11 @@ class TarInfo:
@linkpath.setter
def linkpath(self, linkname: str) -> None: ...
def get_info(self) -> Mapping[str, str | int | bytes | Mapping[str, str]]: ...
def tobuf(self, format: int | None = ..., encoding: str | None = "utf-8", errors: str = "surrogateescape") -> bytes: ...
if sys.version_info >= (3, 8):
def tobuf(self, format: int | None = 2, encoding: str | None = "utf-8", errors: str = "surrogateescape") -> bytes: ...
else:
def tobuf(self, format: int | None = 1, encoding: str | None = "utf-8", errors: str = "surrogateescape") -> bytes: ...
def create_ustar_header(
self, info: Mapping[str, str | int | bytes | Mapping[str, str]], encoding: str, errors: str
) -> bytes: ...