]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-116380: Move pathlib-specific code from `glob` to `pathlib._abc`. (#120011)
authorBarney Gale <barney.gale@gmail.com>
Fri, 7 Jun 2024 16:59:34 +0000 (17:59 +0100)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2024 16:59:34 +0000 (17:59 +0100)
commit242c7498e5a889b47847fb6f0f133ce461fa7e24
tree8ddfc753a1fe1d4f6ba2fd32d5f4b6ebbf3e6c0f
parent90b75405260467814c93738a3325645918d4ea51
GH-116380: Move pathlib-specific code from `glob` to `pathlib._abc`. (#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.
Lib/glob.py
Lib/pathlib/_abc.py