mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Revert "gh-92550 - Fix regression in pathlib.Path.rglob()
(GH-92583)" (GH-92599)
This reverts commit a51baec9ce
.
This commit is contained in:
parent
6a17cdebe9
commit
5197134c1c
5 changed files with 38 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
--
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue