Skip to content

Commit 5326c27

Browse files
authored
Revert "GH-116380: Speed up glob.[i]glob() by making fewer system calls. (#116392)" (#130743)
This broke tests on the 'aarch64 Fedora Stable Clang Installed 3.x' and 'AMD64 Fedora Stable Clang Installed 3.x' build bots. This reverts commit da4899b.
1 parent 5221d9c commit 5326c27

File tree

7 files changed

+229
-240
lines changed

7 files changed

+229
-240
lines changed

Doc/library/glob.rst

+8-10
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ The :mod:`glob` module defines the following functions:
7575
Using the "``**``" pattern in large directory trees may consume
7676
an inordinate amount of time.
7777

78+
.. note::
79+
This function may return duplicate path names if *pathname*
80+
contains multiple "``**``" patterns and *recursive* is true.
81+
7882
.. versionchanged:: 3.5
7983
Support for recursive globs using "``**``".
8084

@@ -84,11 +88,6 @@ The :mod:`glob` module defines the following functions:
8488
.. versionchanged:: 3.11
8589
Added the *include_hidden* parameter.
8690

87-
.. versionchanged:: 3.14
88-
Matching path names are returned only once. In previous versions, this
89-
function may return duplicate path names if *pathname* contains multiple
90-
"``**``" patterns and *recursive* is true.
91-
9291

9392
.. function:: iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \
9493
include_hidden=False)
@@ -99,6 +98,10 @@ The :mod:`glob` module defines the following functions:
9998
.. audit-event:: glob.glob pathname,recursive glob.iglob
10099
.. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob
101100

101+
.. note::
102+
This function may return duplicate path names if *pathname*
103+
contains multiple "``**``" patterns and *recursive* is true.
104+
102105
.. versionchanged:: 3.5
103106
Support for recursive globs using "``**``".
104107

@@ -108,11 +111,6 @@ The :mod:`glob` module defines the following functions:
108111
.. versionchanged:: 3.11
109112
Added the *include_hidden* parameter.
110113

111-
.. versionchanged:: 3.14
112-
Matching path names are yielded only once. In previous versions, this
113-
function may yield duplicate path names if *pathname* contains multiple
114-
"``**``" patterns and *recursive* is true.
115-
116114

117115
.. function:: escape(pathname)
118116

Doc/whatsnew/3.14.rst

-8
Original file line numberDiff line numberDiff line change
@@ -968,14 +968,6 @@ base64
968968
(Contributed by Bénédikt Tran, Chris Markiewicz, and Adam Turner in :gh:`118761`.)
969969

970970

971-
glob
972-
----
973-
974-
* Reduce the number of system calls in :func:`glob.glob` and :func:`~glob.iglob`,
975-
thereby improving the speed of globbing operations by 20-80%.
976-
(Contributed by Barney Gale in :gh:`116380`.)
977-
978-
979971
io
980972
---
981973
* :mod:`io` which provides the built-in :func:`open` makes less system calls

0 commit comments

Comments
 (0)