From d034bc7dac2b1c9c54285a907df04a4a099849e7 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Tue, 6 Jun 2023 21:09:43 +0200 Subject: [PATCH 1/6] Mention that glob.glob can sometimes return duplicates --- Doc/library/glob.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 0e4cfe7ebed797..ed5f24f85d0460 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -77,6 +77,10 @@ For example, ``'[?]'`` matches the character ``'?'``. Using the "``**``" pattern in large directory trees may consume an inordinate amount of time. + .. note:: + This function might return duplicate path names if *pathname* + contains multiple "``**``" patterns and *recursive* is true. + .. versionchanged:: 3.5 Support for recursive globs using "``**``". @@ -96,6 +100,10 @@ For example, ``'[?]'`` matches the character ``'?'``. .. audit-event:: glob.glob pathname,recursive glob.iglob .. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob + .. note:: + This function might return duplicate path names if *pathname* + contains multiple "``**``" patterns and *recursive* is true. + .. versionchanged:: 3.5 Support for recursive globs using "``**``". From 98ce46b71b00ee941496c5ad617cb6a758d4cc85 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Tue, 6 Jun 2023 21:18:35 +0200 Subject: [PATCH 2/6] Add news entry --- .../2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst diff --git a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst new file mode 100644 index 00000000000000..56b4e8a4913e46 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst @@ -0,0 +1,3 @@ +Mention that :func:`glob.glob` and :func:`glob.iglob` may return duplicate +path names if multiple ``**`` patterns are present and ``recursive`` is +true. From 6175bc058a860e5826650f28753e9622b6530348 Mon Sep 17 00:00:00 2001 From: Tomas R Date: Sun, 23 Jul 2023 10:43:00 +0200 Subject: [PATCH 3/6] Fix changelog --- .../2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst index 56b4e8a4913e46..7792e6dc8640aa 100644 --- a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst +++ b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst @@ -1,3 +1,3 @@ Mention that :func:`glob.glob` and :func:`glob.iglob` may return duplicate -path names if multiple ``**`` patterns are present and ``recursive`` is +path names if multiple "``**``" patterns are present and ``recursive`` is true. From ef02c0634dfcecabd224fd9c7dc70955cdd32c3c Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Mon, 24 Jul 2023 18:23:09 +0200 Subject: [PATCH 4/6] Use 'could' rather than 'might' --- Doc/library/glob.rst | 4 ++-- .../2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index ed5f24f85d0460..9fda3a6583da9b 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -78,7 +78,7 @@ For example, ``'[?]'`` matches the character ``'?'``. an inordinate amount of time. .. note:: - This function might return duplicate path names if *pathname* + This function could return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. versionchanged:: 3.5 @@ -101,7 +101,7 @@ For example, ``'[?]'`` matches the character ``'?'``. .. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob .. note:: - This function might return duplicate path names if *pathname* + This function could return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. versionchanged:: 3.5 diff --git a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst index 7792e6dc8640aa..5b29bea4266f73 100644 --- a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst +++ b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst @@ -1,3 +1,3 @@ -Mention that :func:`glob.glob` and :func:`glob.iglob` may return duplicate -path names if multiple "``**``" patterns are present and ``recursive`` is -true. +Mention that :func:`glob.glob` and :func:`glob.iglob` could return +duplicate path names if multiple "``**``" patterns are present and +``recursive`` is true. From fe344435afe1235190dffeabb53542767df36663 Mon Sep 17 00:00:00 2001 From: Tomas R Date: Mon, 22 Jan 2024 09:59:42 +0100 Subject: [PATCH 5/6] Improve wording Co-authored-by: Barney Gale --- Doc/library/glob.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 9fda3a6583da9b..293c2c4fed62fd 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -78,7 +78,7 @@ For example, ``'[?]'`` matches the character ``'?'``. an inordinate amount of time. .. note:: - This function could return duplicate path names if *pathname* + This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. versionchanged:: 3.5 @@ -101,7 +101,7 @@ For example, ``'[?]'`` matches the character ``'?'``. .. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob .. note:: - This function could return duplicate path names if *pathname* + This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. versionchanged:: 3.5 From 75d8eafaed8bd1aab4a1d6e019ee0c9519c2110d Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Mon, 22 Jan 2024 10:01:30 +0100 Subject: [PATCH 6/6] Remove news entry --- .../2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst diff --git a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst b/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst deleted file mode 100644 index 5b29bea4266f73..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2023-06-06-21-18-14.gh-issue-104269.uP1hVC.rst +++ /dev/null @@ -1,3 +0,0 @@ -Mention that :func:`glob.glob` and :func:`glob.iglob` could return -duplicate path names if multiple "``**``" patterns are present and -``recursive`` is true.