8000 GH-77609: Support following symlinks in `pathlib.Path.glob()` by barneygale · Pull Request #104176 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-77609: Support following symlinks in pathlib.Path.glob() #104176

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

Closed
Show file tree
Hide file tree
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-77609-glob-follow-symlinks-triple-star
  • Loading branch information
barneygale committed May 4, 2023
commit 2405074247ffc1057ea04df5b4e5066ad41daee2
6 changes: 6 additions & 0 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,9 @@ call fails (for example because the path doesn't exist).
.. versionchanged:: 3.12
Support for the "``***``" wildcard was added.

.. versionadded:: 3.12
The *case_sensitive* argument.

.. method:: Path.group()

Return the name of the group owning the file. :exc:`KeyError` is raised
Expand Down Expand Up @@ -1307,6 +1310,9 @@ call fails (for example because the path doesn't exist).
.. versionchanged:: 3.12
Support for the "``***``" wildcard was added.

.. versionadded:: 3.12
The *case_sensitive* argument.

.. method:: Path.rmdir()

Remove this directory. The directory must be empty.
Expand Down
4 changes: 2 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def _select_from(self, parent_path, scandir):

class _RecursiveWildcardSelector(_Selector):

def __init__(self, pat, child_parts, flavour):
def __init__(self, pat, child_parts, flavour, case_sensitive):
self.follow_symlinks = pat == '***'
_Selector.__init__(self, child_parts, flavour)
_Selector.__init__(self, child_parts, flavour, case_sensitive)

def _iterate_directories(self, parent_path, scandir):
yield parent_path
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0