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
gh-92550: Fix pathlib.Path.rglob() for empty pattern #92604
gh-92550: Fix pathlib.Path.rglob() for empty pattern #92604
Conversation
@@ -1693,10 +1693,15 @@ def _check(glob, expected): | |||
"dirA", "dirA/linkC", "dirB", "dirB/linkD", "dirC", | |||
"dirC/dirD", "dirE", "linkB", | |||
]) | |||
_check(p.rglob(""), ["", "dirA", "dirB", "dirC", "dirE", "dirC/dirD"]) |
This comment has been hidden.
This comment has been hidden.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should include the original directory for compatibility with the old code of Path.rglob()
and with glob.glob(recursive=True)
.
Thanks @serhiy-storchaka for the PR |
GH-92657 is a backport of this pull request to the 3.11 branch. |
Fixes #92550