Skip to content

gh-148765: Fix description of include_hidden parameter in glob docs#148768

Merged
StanFromIreland merged 9 commits into
python:mainfrom
EoinTrial:fix/glob-include-hidden-docs
Jul 6, 2026
Merged

gh-148765: Fix description of include_hidden parameter in glob docs#148768
StanFromIreland merged 9 commits into
python:mainfrom
EoinTrial:fix/glob-include-hidden-docs

Conversation

@EoinTrial

@EoinTrial EoinTrial commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

The include_hidden parameter in glob.glob() and glob.iglob() is described as:

If include_hidden is true, "**" pattern will match hidden directories.

This is inaccurate because the flag affects all wildcard patterns, not just **, and "hidden directories" wrongly implies Windows FILE_ATTRIBUTE_HIDDEN rather than dot-prefixed names.

The fix aligns the wording with glob.translate(), which already uses the correct description in the same file.

Discourse thread from 2022 where this was identified: https://discuss.python.org/t/new-glob-documentation-could-be-improved/19054


📚 Documentation preview 📚: https://cpython-previews--148768.org.readthedocs.build/

Comment thread Misc/NEWS.d/next/Documentation/2026-04-19-20-31-27.gh-issue-148765.SNB_1A.rst Outdated
@EoinTrial EoinTrial force-pushed the fix/glob-include-hidden-docs branch from 61d30bc to 6182c5d Compare April 30, 2026 20:19
@bedevere-app

This comment was marked as low quality.

@read-the-docs-community

read-the-docs-community Bot commented Apr 30, 2026

Copy link
Copy Markdown

Comment thread Doc/library/glob.rst Outdated
@bedevere-app

This comment was marked as spam.

@StanFromIreland

Copy link
Copy Markdown
Member

There are conflicts now.

@EoinTrial EoinTrial requested a review from StanFromIreland July 5, 2026 17:57
Comment thread Doc/library/glob.rst Outdated
Comment thread Doc/library/glob.rst Outdated
Comment thread Doc/library/glob.rst Outdated
@EoinTrial EoinTrial requested a review from StanFromIreland July 5, 2026 18:24

@StanFromIreland StanFromIreland 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.

LGTM, please just tidy up the blurb.

Comment thread Misc/NEWS.d/next/Documentation/2026-07-05-19-00-00.gh-issue-148765.fixglob1.rst Outdated
@bedevere-app

This comment was marked as resolved.

@bedevere-app

This comment was marked as abuse.

@EoinTrial

Copy link
Copy Markdown
Contributor Author

@StanFromIreland Thanks for all of your help! Good to merge? :)

@StanFromIreland StanFromIreland merged commit db3a477 into python:main Jul 6, 2026
97 of 99 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jul 6, 2026
@StanFromIreland StanFromIreland added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 6, 2026
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

Thanks @EoinTrial for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Jul 6, 2026

Copy link
Copy Markdown

GH-153172 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 Jul 6, 2026
@bedevere-app

bedevere-app Bot commented Jul 6, 2026

Copy link
Copy Markdown

GH-153173 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 6, 2026
@bedevere-app

bedevere-app Bot commented Jul 6, 2026

Copy link
Copy Markdown

GH-153174 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 Jul 6, 2026
@StanFromIreland

Copy link
Copy Markdown
Member

Merged, thanks.

StanFromIreland added a commit that referenced this pull request Jul 6, 2026
…lob.glob()` docs (GH-148768) (#153174)

(cherry picked from commit db3a477)

Co-authored-by: Eoin Shaughnessy <45000144+EoinTrial@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland added a commit that referenced this pull request Jul 6, 2026
…lob.glob()` docs (GH-148768) (#153172)

(cherry picked from commit db3a477)

Co-authored-by: Eoin Shaughnessy <45000144+EoinTrial@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
StanFromIreland added a commit that referenced this pull request Jul 6, 2026
…lob.glob()` docs (GH-148768) (#153173)

(cherry picked from commit db3a477)

Co-authored-by: Eoin Shaughnessy <45000144+EoinTrial@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
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.

2 participants