add "w:tar" as a mode for tarfile (#13401)

This commit is contained in:
Anthony Sottile
2025-01-14 11:26:25 -05:00
committed by GitHub
parent 1017916da2
commit 101287091c

View File

@@ -123,7 +123,7 @@ def open(
@overload
def open(
name: StrOrBytesPath | None,
mode: Literal["x", "x:", "a", "a:", "w", "w:"],
mode: Literal["x", "x:", "a", "a:", "w", "w:", "w:tar"],
fileobj: _Fileobj | None = None,
bufsize: int = 10240,
*,
@@ -141,7 +141,7 @@ def open(
def open(
name: StrOrBytesPath | None = None,
*,
mode: Literal["x", "x:", "a", "a:", "w", "w:"],
mode: Literal["x", "x:", "a", "a:", "w", "w:", "w:tar"],
fileobj: _Fileobj | None = None,
bufsize: int = 10240,
format: int | None = ...,