◐ Shell
clean mode source ↗

GH-89812: Add `pathlib.UnsupportedOperation` by barneygale · Pull Request #105926 · python/cpython

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()`.

@barneygale barneygale changed the title GH-89812: Add pathlib.UnsupportedOperation GH-89812: Add pathlib.UnsupportedOperation

Jun 19, 2023

@barneygale

@barneygale

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

Jun 23, 2023
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()`.