GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-117841: Speed up `pathlib.Path.glob()` on Windows by using `lexists()` by barneygale · Pull Request #117858 · python/cpython

Conversation

@barneygale

@barneygale barneygale commented Apr 13, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Use os.path.lexists() rather than os.lstat() to test whether paths exist. This is equivalent on POSIX, but faster on Windows.

Depends on #117842

  • Issue: Builtin function for ntpath.lexists #117841

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nineteendo reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@barneygale
pythonGH-117842: Speed up pathlib.Path.glob() on Windows by using `…
492285e
…lexists()`

Use `os.path.lexists()` rather than `os.lstat()` to test whether paths
exist. This is equivalent on POSIX, but faster on Windows.
@barneygale barneygale added performance Performance or resource usage topic-pathlib labels Apr 13, 2024
@barneygale barneygale changed the title GH-117842: Speed up pathlib.Path.glob() on Windows by using lexists() GH-117841: Speed up pathlib.Path.glob() on Windows by using lexists() Apr 13, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Apr 13, 2024
Builtin function for ntpath.lexists #117841
Closed
@barneygale barneygale mentioned this pull request Apr 15, 2024
gh-117841: Add C implementation of ntpath.lexists #117842
Closed
@barneygale
Fix comment.
6a9a497
nineteendo
nineteendo reviewed Apr 15, 2024
View reviewed changes
Comment thread Lib/glob.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@nineteendo nineteendo mentioned this pull request Apr 24, 2024
GH-101357: Suppress OSError from pathlib.Path.exists() and is_*() #118243
Merged
@barneygale barneygale closed this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@nineteendo nineteendo nineteendo left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

performance Performance or resource usage topic-pathlib

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@barneygale @nineteendo
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.