]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-127381: pathlib ABCs: remove `PathBase.samefile()` and rarer `is_*()` (#127709)
authorBarney Gale <barney.gale@gmail.com>
Wed, 11 Dec 2024 00:09:55 +0000 (00:09 +0000)
committerGitHub <noreply@github.com>
Wed, 11 Dec 2024 00:09:55 +0000 (00:09 +0000)
commit12b4f1a5a175d4dcec27631fce2883038f0917ae
tree3fc1e27178bb57eb9a8f24d0f9713828771d28b4
parent51216857ca8283f5b41c8cf9874238da56da4968
GH-127381: pathlib ABCs: remove `PathBase.samefile()` and rarer `is_*()` (#127709)

Remove `PathBase.samefile()`, which is fairly specific to the local FS, and
relies on `stat()`, which we're aiming to remove from `PathBase`.

Also remove `PathBase.is_mount()`, `is_junction()`, `is_block_device()`,
`is_char_device()`, `is_fifo()` and `is_socket()`. These rely on POSIX
file type numbers that we're aiming to remove from the `PathBase` API.
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib.py
Lib/test/test_pathlib/test_pathlib_abc.py