From 40d6592ba125db50d504df238ac1815f273c9550 Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Wed, 11 May 2022 22:02:04 -0700 Subject: [PATCH] tarfile.gettarinfo() accepts PathLike objects (#7832) This method has accepted PathLike objects since Python 3.6 (https://github.com/python/cpython/pull/512) --- stdlib/tarfile.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/tarfile.pyi b/stdlib/tarfile.pyi index 364bcad06..87c57311a 100644 --- a/stdlib/tarfile.pyi +++ b/stdlib/tarfile.pyi @@ -315,7 +315,9 @@ class TarFile: ) -> None: ... def addfile(self, tarinfo: TarInfo, fileobj: IO[bytes] | None = ...) -> None: ... - def gettarinfo(self, name: str | None = ..., arcname: str | None = ..., fileobj: IO[bytes] | None = ...) -> TarInfo: ... + def gettarinfo( + self, name: StrOrBytesPath | None = ..., arcname: str | None = ..., fileobj: IO[bytes] | None = ... + ) -> TarInfo: ... def close(self) -> None: ... if sys.version_info >= (3, 9):