GH-89812: Add pathlib.UnsupportedOperation
by barneygale · Pull Request #105926 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation4 Commits3 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Contributor
barneygale commented
•
edited by github-actionsbot
Loading
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()
.
- Issue: Add tarfile.TarPath #89812
📚 Documentation preview 📚: https://cpython-previews--105926.org.readthedocs.build/
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 changed the title
GH-89812: Add pathlib.UnsupportedOperation GH-89812: Add pathlib.UnsupportedOperation
Looks good, thank you!
I'd add versionadded
notes to the docs of all the functions, since we can't expect readers to check the docs for UnsupportedOperation
.
Good shout, thank you. I've done it via .. versionchanged
directives on each method - does it look OK?
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!
bentasker pushed a commit to bentasker/cpython that referenced this pull request
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()
.