mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-92550 - Fix regression in pathlib.Path.rglob()
(GH-92583)
We could try to remedy this by taking a slice, but we then run into an issue where the empty string will match altsep on POSIX. That rabbit hole could keep getting deeper.
A proper fix for the original issue involves making pathlib's path normalisation more configurable - in this case we want to retain trailing slashes, but in other we might want to preserve `./` prefixes, or elide `../` segments when we're sure we won't encounter symlinks.
This reverts commit ea2f5bcda1
.
This commit is contained in:
parent
cb35402c18
commit
dcdf250d2d
5 changed files with 2 additions and 38 deletions
|
@ -557,15 +557,6 @@ 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
|
||||
--
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue