From 2b9e41568bf063c89210743b3620e142d18dba7f Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Thu, 20 Jun 2024 09:32:01 +0000 Subject: [PATCH 1/4] os.path.splitroot: Python 3.13 --- stdlib/@tests/stubtest_allowlists/darwin-py313.txt | 1 - stdlib/@tests/stubtest_allowlists/linux-py313.txt | 1 - stdlib/@tests/stubtest_allowlists/py313.txt | 1 - stdlib/@tests/stubtest_allowlists/win32-py313.txt | 1 - 4 files changed, 4 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt index c9bfa2d8d594..a1460e59119c 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt @@ -26,7 +26,6 @@ os.waitid_result posix.grantpt posix.posix_openpt posix.ptsname -posixpath.splitroot posix.unlockpt posix.waitid posix.waitid_result diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index 8101077386cd..16e73b6a3b03 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -44,7 +44,6 @@ posix.TFD_TIMER_CANCEL_ON_SET posix.grantpt posix.posix_openpt posix.ptsname -posixpath.splitroot posix.timerfd_create posix.timerfd_gettime posix.timerfd_gettime_ns diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index 3da3b81a140c..ef51b90c5af8 100644 --- a/stdlib/@tests/stubtest_allowlists/py313.txt +++ b/stdlib/@tests/stubtest_allowlists/py313.txt @@ -108,7 +108,6 @@ mailbox.Maildir.get_info mailbox.Maildir.remove_flag mailbox.Maildir.set_flags mailbox.Maildir.set_info -os.path.splitroot pdb.Pdb.MAX_CHAINED_EXCEPTION_DEPTH pdb.Pdb.completedefault pdb.Pdb.completenames diff --git a/stdlib/@tests/stubtest_allowlists/win32-py313.txt b/stdlib/@tests/stubtest_allowlists/win32-py313.txt index baa53871666b..77cef26305c8 100644 --- a/stdlib/@tests/stubtest_allowlists/win32-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/win32-py313.txt @@ -33,7 +33,6 @@ nt.fchmod nt.lchmod ntpath.exists ntpath.lexists -ntpath.splitroot os.fchmod os.lchmod os.path.exists From a489c5905c12ea1557387e949476dfd140e6217c Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Thu, 20 Jun 2024 09:50:35 +0000 Subject: [PATCH 2/4] update --- stdlib/posixpath.pyi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stdlib/posixpath.pyi b/stdlib/posixpath.pyi index e5f5fa0d813c..4a343ded73f6 100644 --- a/stdlib/posixpath.pyi +++ b/stdlib/posixpath.pyi @@ -164,3 +164,9 @@ if sys.version_info >= (3, 12): def splitroot(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... @overload def splitroot(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ... + +if sys.version_info >= (3, 13): + @overload + def splitroot(path: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... + @overload + def splitroot(path: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ... From 601b0fe85a120b4d5703c6ebba54bbacbe23c43c Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Thu, 20 Jun 2024 09:53:15 +0000 Subject: [PATCH 3/4] update --- stdlib/posixpath.pyi | 6 ------ 1 file changed, 6 deletions(-) diff --git a/stdlib/posixpath.pyi b/stdlib/posixpath.pyi index 4a343ded73f6..e5f5fa0d813c 100644 --- a/stdlib/posixpath.pyi +++ b/stdlib/posixpath.pyi @@ -164,9 +164,3 @@ if sys.version_info >= (3, 12): def splitroot(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... @overload def splitroot(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ... - -if sys.version_info >= (3, 13): - @overload - def splitroot(path: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... - @overload - def splitroot(path: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ... From 45427de2ae8632784a6e0423caa03d7d3c70e69b Mon Sep 17 00:00:00 2001 From: Amin Alaee Date: Mon, 1 Jul 2024 13:43:42 +0200 Subject: [PATCH 4/4] Update posixpath.pyi --- stdlib/posixpath.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/posixpath.pyi b/stdlib/posixpath.pyi index e5f5fa0d813c..ec5aeccce264 100644 --- a/stdlib/posixpath.pyi +++ b/stdlib/posixpath.pyi @@ -161,6 +161,6 @@ def lexists(path: FileDescriptorOrPath) -> bool: ... if sys.version_info >= (3, 12): def isjunction(path: StrOrBytesPath) -> bool: ... @overload - def splitroot(p: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... + def splitroot(path: AnyOrLiteralStr) -> tuple[AnyOrLiteralStr, AnyOrLiteralStr, AnyOrLiteralStr]: ... @overload - def splitroot(p: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ... + def splitroot(path: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr, AnyStr]: ...