◐ Shell
clean mode source ↗

GH-127381: pathlib ABCs: remove `PathBase.unlink()` and `rmdir()` by barneygale · Pull Request #127736 · python/cpython

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.

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request

Jan 8, 2025
…)` (python#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.