Revert "gh-92550 - Fix regression in pathlib.Path.rglob() (GH-92583)" (GH-92599)

This reverts commit a51baec9ce.
This commit is contained in:
Serhiy Storchaka 2022-05-11 07:14:40 +03:00 committed by GitHub
parent 6a17cdebe9
commit 5197134c1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 2 deletions

View file

@ -815,6 +815,9 @@ call fails (for example because the path doesn't exist).
.. audit-event:: pathlib.Path.glob self,pattern pathlib.Path.glob
.. versionchanged:: 3.11
Return only directories if *pattern* ends with a pathname components
separator (:data:`~os.sep` or :data:`~os.altsep`).
.. method:: Path.group()
@ -1104,6 +1107,9 @@ call fails (for example because the path doesn't exist).
.. audit-event:: pathlib.Path.rglob self,pattern pathlib.Path.rglob
.. versionchanged:: 3.11
Return only directories if *pattern* ends with a pathname components
separator (:data:`~os.sep` or :data:`~os.altsep`).
.. method:: Path.rmdir()

View file

@ -559,6 +559,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
--