Skip to content

gh-142972: Document arbitrary ordering in Path.glob#143025

Merged
ZeroIntensity merged 7 commits into
python:mainfrom
johnslavik:document-glob-unordered-paths
Jan 11, 2026
Merged

gh-142972: Document arbitrary ordering in Path.glob#143025
ZeroIntensity merged 7 commits into
python:mainfrom
johnslavik:document-glob-unordered-paths

Conversation

@johnslavik

@johnslavik johnslavik commented Dec 20, 2025

Copy link
Copy Markdown
Member

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say 'unordered' or 'no ordering guarantees'. Please also add the note to rglob().

A

@bedevere-app

bedevere-app Bot commented Dec 20, 2025

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@johnslavik

johnslavik commented Dec 20, 2025

Copy link
Copy Markdown
Member Author

I would say 'unordered' or 'no ordering guarantees'. Please also add the note to rglob().

Thanks. Would you also like me to correct the glob module documention to use the same wording?
This is what's in glob docs rn (GH-140184):

.. note::
The pathnames are returned in no particular order. If you need a specific
order, sort the results.

@johnslavik

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

@bedevere-app

bedevere-app Bot commented Dec 20, 2025

Copy link
Copy Markdown

Thanks for making the requested changes!

@AA-Turner: please review the changes made to this pull request.

@bedevere-app bedevere-app Bot requested a review from AA-Turner December 20, 2025 19:48
@AA-Turner

Copy link
Copy Markdown
Member

Oh, fine: in that case just reuse the exact wording (ie drop 'akin' etc)

A

@johnslavik

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again

@bedevere-app

bedevere-app Bot commented Dec 20, 2025

Copy link
Copy Markdown

Thanks for making the requested changes!

@AA-Turner: please review the changes made to this pull request.

Comment thread Doc/library/pathlib.rst
@johnslavik johnslavik requested a review from AA-Turner December 20, 2025 21:28

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Unless @barneygale has any comments, will merge in a few days.

A

@johnslavik

johnslavik commented Jan 1, 2026

Copy link
Copy Markdown
Member Author

@AA-Turner I think we can merge? :)

@ZeroIntensity ZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 11, 2026
@ZeroIntensity ZeroIntensity merged commit 9d13ca9 into python:main Jan 11, 2026
35 of 36 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jan 11, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @johnslavik for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 11, 2026
….rglob` (pythonGH-143025)

(cherry picked from commit 9d13ca9)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 11, 2026
….rglob` (pythonGH-143025)

(cherry picked from commit 9d13ca9)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
@bedevere-app

bedevere-app Bot commented Jan 11, 2026

Copy link
Copy Markdown

GH-143709 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jan 11, 2026
@bedevere-app

bedevere-app Bot commented Jan 11, 2026

Copy link
Copy Markdown

GH-143710 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jan 11, 2026
ZeroIntensity pushed a commit that referenced this pull request Jan 11, 2026
…h.rglob` (GH-143025) (GH-143709)

gh-142972: Document arbitrary ordering in `Path.glob` and `Path.rglob` (GH-143025)
(cherry picked from commit 9d13ca9)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
ZeroIntensity pushed a commit that referenced this pull request Jan 11, 2026
…h.rglob` (GH-143025) (GH-143710)

gh-142972: Document arbitrary ordering in `Path.glob` and `Path.rglob` (GH-143025)
(cherry picked from commit 9d13ca9)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
reidenong pushed a commit to reidenong/cpython that referenced this pull request Jan 12, 2026
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants