]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-127381: pathlib ABCs: remove `PathBase.unlink()` and `rmdir()` (#127736)
authorBarney Gale <barney.gale@gmail.com>
Sun, 8 Dec 2024 18:45:09 +0000 (18:45 +0000)
committerGitHub <noreply@github.com>
Sun, 8 Dec 2024 18:45:09 +0000 (18:45 +0000)
commit7f8ec523021427a5c1ab3ce0cdd6e4bb909f1dc5
tree7939eb62c8eb50421ab9024e0d9b27c0e04bf90c
parent2367759212f609b8ddf3218003b3ccd8e72849ae
GH-127381: pathlib ABCs: remove `PathBase.unlink()` and `rmdir()` (#127736)

Virtual filesystems don't always make a distinction between deleting files
and empty directories, and sometimes support deleting non-empty directories
in a single operation. Here we remove `PathBase.unlink()` and `rmdir()`,
leaving `_delete()` as the sole deletion method, now made abstract. I hope
to drop the underscore prefix later on.
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py