FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-125413: pathlib ABCs: use caching `path.info.exists()` when globbing by barneygale · Pull Request #130422 · python/cpython · GitHub

/ cpython Public

GH-125413: pathlib ABCs: use caching path.info.exists() when globbing - #130422

Merged
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-125413-glob-lexists
Feb 24, 2025
Merged

GH-125413: pathlib ABCs: use caching path.info.exists() when globbing#130422
barneygale merged 2 commits into
python:mainfrom
barneygale:gh-125413-glob-lexists

Conversation

barneygale commented Feb 21, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Call ReadablePath.info.exists() rather than ReadablePath.exists() when globbing so that we use (or populate) the info cache.

No change to Path.glob(), which uses glob._StringGlobber (hence os.lexists()) rather than glob._PathGlobber.

…globbing

Call `ReadablePath.info.exists()` rather than `ReadablePath.exists()` when
globbing so that we use (or populate) the `info` cache.
barneygale merged commit 48c84a4 into python:main Feb 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL