summaryrefslogtreecommitdiffstats
path: root/Misc
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 /Misc
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 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-11-11-04-41-11.bpo-22276.Tt19TW.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-11-11-04-41-11.bpo-22276.Tt19TW.rst b/Misc/NEWS.d/next/Library/2018-11-11-04-41-11.bpo-22276.Tt19TW.rst
new file mode 100644
index 0000000..357c3f4
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-11-11-04-41-11.bpo-22276.Tt19TW.rst
@@ -0,0 +1,4 @@
+:class:`~pathlib.Path` methods :meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only
+directories if *pattern* ends with a pathname components separator
+(``/`` or :data:`~os.sep`).
+Patch by Eisuke Kawashima.