Skip to content
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-79634: Speed up pathlib globbing by removing joinpath() call. #114623

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jan 26, 2024

Remove self.joinpath('') call that should have been removed in 6313cdd.

This makes PathBase.glob('') yield itself without adding a trailing slash. It's hard to say whether this is more or less correct, but at least everything else is faster, and there's no behaviour change in the public classes where empty glob patterns are disallowed.

Remove `self.joinpath('')` call that should have been removed in 6313cdd.

This makes `PathBase.glob('')` yield itself *without* adding a trailing
slash. It's hard to say whether this is more or less correct, but at least
everything else is faster, and there's no behaviour change in the public
classes where empty glob patterns are disallowed.
@barneygale barneygale merged commit 823a38a into python:main Jan 27, 2024
27 checks passed
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…ll. (python#114623)

Remove `self.joinpath('')` call that should have been removed in 6313cdd.

This makes `PathBase.glob('')` yield itself *without* adding a trailing slash. It's hard to say whether this is more or less correct, but at least everything else is faster, and there's no behaviour change in the public classes where empty glob patterns are disallowed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage skip news topic-pathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant