8000 GH-104102: Optimize `pathlib.Path.glob()` handling of `../` pattern segments by barneygale · Pull Request #104103 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-104102: Optimize pathlib.Path.glob() handling of ../ pattern seg 8000 ments #104103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into gh-104102-optimize-glob-parent
  • Loading branch information
barneygale committed May 2, 2023
commit 581e8c5b77607b0cc7c9ab2392f1598a736f5091
4 changes: 2 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ class _ParentSelector(_Selector):
def __init__(self, name, child_parts, case_sensitive):
_Selector.__init__(self, child_parts, case_sensitive)

def _select_from(self, parent_path, is_dir, exists, scandir, normcase):
def _select_from(self, parent_path, is_dir, exists, scandir):
path = parent_path._make_child_relpath('..')
for p in self.successor._select_from(path, is_dir, exists, scandir, normcase):
for p in self.successor._select_from(path, is_dir, exists, scandir):
yield p


Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0