Skip to content

[3.11] gh-92550 - Fix regression in pathlib.Path.rglob() (GH-92583) #92589

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 1 commit into from
May 10, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 10, 2022

We could try to remedy this by taking a slice, but we then run into an issue where the empty string will match altsep on POSIX. That rabbit hole could keep getting deeper.

A proper fix for the original issue involves making pathlib's path normalisation more configurable - in this case we want to retain trailing slashes, but in other we might want to preserve ./ prefixes, or elide ../ segments when we're sure we won't encounter symlinks.

This reverts commit ea2f5bc.
(cherry picked from commit dcdf250)

Co-authored-by: Barney Gale barney.gale@gmail.com

Automerge-Triggered-By: GH:brettcannon

…2583)

We could try to remedy this by taking a slice, but we then run into an issue where the empty string will match altsep on POSIX. That rabbit hole could keep getting deeper.

A proper fix for the original issue involves making pathlib's path normalisation more configurable - in this case we want to retain trailing slashes, but in other we might want to preserve `./` prefixes, or elide `../` segments when we're sure we won't encounter symlinks.

This reverts commit ea2f5bc.
(cherry picked from commit dcdf250)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@miss-islington
Copy link
Contributor Author

@barneygale: Status check is done, and it's a success ✅ .

2 similar comments
@miss-islington
Copy link
Contributor Author

@barneygale: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@barneygale: Status check is done, and it's a success ✅ .

@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label May 10, 2022
@miss-islington
Copy link
Contributor Author

@barneygale: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants