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-116380: Move pathlib-specific code from glob to pathlib._abc. #120011

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jun 4, 2024

In glob._Globber, move pathlib-specific methods to pathlib._abc.Globber and replace them with abstract methods. Rename glob._Globber to glob._GlobberBase, and glob._StringGlobber to glob._Globber. As a result, the glob module is no longer befouled by code that can only ever apply to pathlib.

No change of behaviour.

…abc`.

In `glob._Globber`, move pathlib-specific methods to `pathlib._abc.Globber`
and replace them with abstract methods. Rename `glob._Globber` to
`glob._GlobberBase`, and  `glob._StringGlobber` to `glob._Globber`. As a
result, the `glob` module is no longer befouled by code that can only ever
apply to pathlib.

No change of behaviour.
@barneygale barneygale merged commit 242c749 into python:main Jun 7, 2024
31 checks passed
@miss-islington-app
Copy link

Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @barneygale, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 242c7498e5a889b47847fb6f0f133ce461fa7e24 3.13

@barneygale barneygale removed the needs backport to 3.13 bugs and security fixes label Jun 7, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…abc`. (python#120011)

In `glob._Globber`, move pathlib-specific methods to `pathlib._abc.PathGlobber` and replace them with abstract methods. Rename `glob._Globber` to `glob._GlobberBase`. As a result, the `glob` module is no longer befouled by code that can only ever apply to pathlib.

No change of behaviour.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…abc`. (python#120011)

In `glob._Globber`, move pathlib-specific methods to `pathlib._abc.PathGlobber` and replace them with abstract methods. Rename `glob._Globber` to `glob._GlobberBase`. As a result, the `glob` module is no longer befouled by code that can only ever apply to pathlib.

No change of behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant