GH-73991: Make pathlib.Path.delete() private.#123315
Conversation
Per feedback from Paul Moore on pythonGH-123158, it's better to defer making `Path.delete()` public than ship it with under-designed error handling capabilities. We leave a remnant `_delete()` method, which is used by `move()`. Any functionality not needed by `move()` is deleted.
|
The primary reason why I don't want to expose |
Ah. I hadn't appreciated that was your concern. I think it's a valid reason to be cautious, but I suspect it's something that we won't be able to do anything about. In the medium term, we may be best simply documenting our way out of the issue - stating in the API docs that users cannot rely on when, if or how |
Per feedback from Paul Moore on GH-123158, it's better to defer making
Path.delete()public than ship it with under-designed error handling capabilities.We leave a remnant
_delete()method, which is used bymove(). Any functionality not needed bymove()is deleted.📚 Documentation preview 📚: https://cpython-previews--123315.org.readthedocs.build/