diff options
author | Barney Gale <barney.gale@gmail.com> | 2023-06-22 13:35:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 13:35:51 (GMT) |
commit | a8006706f7d6e8825b90f1970beed7845d1d72ed (patch) | |
tree | 3926d14507d730ee20c402e78b6f5e567f0caf4e /Misc | |
parent | 04492cbc9aa45ac2c12d22083c406a0364c39f5b (diff) | |
download | cpython-a8006706f7d6e8825b90f1970beed7845d1d72ed.zip cpython-a8006706f7d6e8825b90f1970beed7845d1d72ed.tar.gz cpython-a8006706f7d6e8825b90f1970beed7845d1d72ed.tar.bz2 |
GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)
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()`.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-06-19-22-20-41.gh-issue-89812.z2l_e8.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-06-19-22-20-41.gh-issue-89812.z2l_e8.rst b/Misc/NEWS.d/next/Library/2023-06-19-22-20-41.gh-issue-89812.z2l_e8.rst new file mode 100644 index 0000000..f1ef11e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-06-19-22-20-41.gh-issue-89812.z2l_e8.rst @@ -0,0 +1,2 @@ +Add :exc:`pathlib.UnsupportedOperation`, which is raised instead of +:exc:`NotImplementedError` when a path operation isn't supported. |