-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
GH-89812: Add pathlib.UnsupportedOperation
#105926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
pathlib.UnsupportedOperation
|
Looks good, thank you! I'd add |
|
Good shout, thank you. I've done it via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
|
Thanks very much for the idea and review! |
This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
This new exception type is raised instead of
NotImplementedErrorwhen a path operation is not supported. It can be raised fromPath.readlink(),symlink_to(),hardlink_to(),owner()andgroup(). In a future version of pathlib, it will be raised byAbstractPathfor these methods and others, such asAbstractPath.mkdir()andunlink().📚 Documentation preview 📚: https://cpython-previews--105926.org.readthedocs.build/