From 987c720b6902b1a411cc6ecad095d9df75b854ab Mon Sep 17 00:00:00 2001 From: kovan Date: Tue, 3 Feb 2026 23:04:56 +0100 Subject: [PATCH 1/2] gh-140490: Document versionchanged for PurePath.stem in Python 3.14 Add versionchanged note explaining that the behavior of stem changed in Python 3.14 because a single dot is now considered a valid suffix. Previously 'file.'.stem returned 'file.', now it returns 'file'. Co-Authored-By: Claude Opus 4.5 --- Doc/library/pathlib.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 1575de6c6f5935..a393084739b65c 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -486,6 +486,10 @@ Pure paths provide the following methods and properties: >>> PurePosixPath('my/library').stem 'library' + .. versionchanged:: 3.14 + + A single dot ("``.``") is now considered a valid suffix. + .. method:: PurePath.as_posix() From acb778771f6e34f4e1776caa38ad0e535acf917c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Wed, 4 Feb 2026 19:34:13 +0100 Subject: [PATCH 2/2] Update Doc/library/pathlib.rst --- Doc/library/pathlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index a393084739b65c..63603947569818 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -488,7 +488,7 @@ Pure paths provide the following methods and properties: .. versionchanged:: 3.14 - A single dot ("``.``") is now considered a valid suffix. + A single dot ("``.``") is considered a valid suffix. .. method:: PurePath.as_posix()