]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)
authorBarney Gale <barney.gale@gmail.com>
Thu, 22 Jun 2023 13:35:51 +0000 (14:35 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Jun 2023 13:35:51 +0000 (14:35 +0100)
commita8006706f7d6e8825b90f1970beed7845d1d72ed
tree3926d14507d730ee20c402e78b6f5e567f0caf4e
parent04492cbc9aa45ac2c12d22083c406a0364c39f5b
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()`.
Doc/library/pathlib.rst
Doc/whatsnew/3.13.rst
Lib/pathlib.py
Lib/test/test_pathlib.py
Misc/NEWS.d/next/Library/2023-06-19-22-20-41.gh-issue-89812.z2l_e8.rst [new file with mode: 0644]