Skip to content

Commit 2ecfe08

Browse files
committed
Merge branch 'main' into load-fast-borrow-absinterp
2 parents e692037 + 75f38af commit 2ecfe08

File tree

11 files changed

+399
-1013
lines changed

11 files changed

+399
-1013
lines changed

Doc/library/glob.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ 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-
8278
.. versionchanged:: 3.5
8379
Support for recursive globs using "``**``".
8480

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

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+
9192

9293
.. function:: iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \
9394
include_hidden=False)
@@ -98,10 +99,6 @@ The :mod:`glob` module defines the following functions:
9899
.. audit-event:: glob.glob pathname,recursive glob.iglob
99100
.. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob
100101

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

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

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+
114116

115117
.. function:: escape(pathname)
116118

Doc/whatsnew/3.14.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,14 @@ 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+
971979
io
972980
---
973981
* :mod:`io` which provides the built-in :func:`open` makes less system calls

0 commit comments

Comments
 (0)