summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>2022-04-28 19:45:03 (GMT)
committerGitHub <noreply@github.com>2022-04-28 19:45:03 (GMT)
commitea2f5bcda1a392804487e6883be89fbad38a01a5 (patch)
tree9aa400b03250297948bce5eede3d13075f15fad9 /Doc/whatsnew
parent0ef8d921f5c6945aa8f386e472c4110b81ac773d (diff)
downloadcpython-ea2f5bcda1a392804487e6883be89fbad38a01a5.zip
cpython-ea2f5bcda1a392804487e6883be89fbad38a01a5.tar.gz
cpython-ea2f5bcda1a392804487e6883be89fbad38a01a5.tar.bz2
bpo-22276: Change pathlib.Path.glob not to ignore trailing path separator (GH-10349)
Now pathlib.Path.glob() **only** matches directories when the pattern ends in a path separator. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.11.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index b2b9874..5f1f995 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -506,6 +506,15 @@ os
instead of ``CryptGenRandom()`` which is deprecated.
(Contributed by Dong-hee Na in :issue:`44611`.)
+
+pathlib
+-------
+
+* :meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only
+ directories if *pattern* ends with a pathname components separator:
+ :data:`~os.sep` or :data:`~os.altsep`.
+ (Contributed by Eisuke Kawasima in :issue:`22276` and :issue:`33392`.)
+
re
--