shutil.unpack_archive: update for py312 (#10215)

Add the new "filter" parameter
This commit is contained in:
Shantanu
2023-05-25 01:53:25 -07:00
committed by GitHub
parent 1eeab77254
commit a4e33d4053

View File

@@ -167,7 +167,15 @@ def register_archive_format(
name: str, function: Callable[[str, str], object], extra_args: None = None, description: str = ""
) -> None: ...
def unregister_archive_format(name: str) -> None: ...
def unpack_archive(filename: StrPath, extract_dir: StrPath | None = None, format: str | None = None) -> None: ...
if sys.version_info >= (3, 12):
def unpack_archive(
filename: StrPath, extract_dir: StrPath | None = None, format: str | None = None, *, filter: str | None = None
) -> None: ...
else:
def unpack_archive(filename: StrPath, extract_dir: StrPath | None = None, format: str | None = None) -> None: ...
@overload
def register_unpack_format(
name: str,