]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-110109: Move pathlib ABCs to new `pathlib._abc` module. (#112881)
authorBarney Gale <barney.gale@gmail.com>
Sat, 9 Dec 2023 15:07:40 +0000 (15:07 +0000)
committerGitHub <noreply@github.com>
Sat, 9 Dec 2023 15:07:40 +0000 (16:07 +0100)
commita98e7a8112f5d77fd647e70c4cf4264b2fd12288
tree894b26db92910391fb119bdd7db6bc77d9b116aa
parentc98c40227e8cd976a08ff0f6dc386b5d33f62f84
GH-110109: Move pathlib ABCs to new `pathlib._abc` module. (#112881)

Move `_PurePathBase` and `_PathBase` to a new `pathlib._abc` module, and
drop the underscores from the class names.

Tests are mostly left alone in this commit, but they'll be similarly split
in a subsequent commit.

The `pathlib._abc` module will be published as an independent PyPI package
(similar to how `zipfile._path` is published as `zipp`), to be refined
and stabilised prior to its possible addition to the standard library.
Lib/pathlib/__init__.py [new file with mode: 0644]
Lib/pathlib/_abc.py [moved from Lib/pathlib.py with 70% similarity]
Lib/test/test_pathlib.py