Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-89812: Addpathlib.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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
barneygale merged 3 commits intopython:mainfrombarneygale:unsupportedoperation
Jun 22, 2023

Conversation

barneygale
Copy link
Contributor

@barneygalebarneygale commentedJun 19, 2023
edited by github-actionsbot
Loading

This new exception type is raised instead ofNotImplementedError when 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 byAbstractPath for these methods and others, such asAbstractPath.mkdir() andunlink().


📚 Documentation preview 📚:https://cpython-previews--105926.org.readthedocs.build/

This new exception type is raised instead of `NotImplementedError` whena path operation is not supported. It can be raised from `Path.readlink()`,`symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a futureversion of pathlib, it will be raised by `AbstractPath` for these methodsand others, such as `AbstractPath.mkdir()` and `unlink()`.
@barneygalebarneygale changed the titleGH-89812: Add pathlib.UnsupportedOperationGH-89812: Addpathlib.UnsupportedOperationJun 19, 2023
@barneygalebarneygale requested a review fromencukouJune 19, 2023 22:16
@encukou
Copy link
Member

Looks good, thank you!

I'd addversionadded notes to the docs of all the functions, since we can't expect readers to check the docs forUnsupportedOperation.

barneygale reacted with thumbs up emoji

@barneygale
Copy link
ContributorAuthor

Good shout, thank you. I've done it via.. versionchanged directives on each method - does it look OK?

Copy link
Member

@encukouencukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good, thanks!

@barneygale
Copy link
ContributorAuthor

Thanks very much for the idea and review!

@barneygalebarneygale merged commita800670 intopython:mainJun 22, 2023
bentasker pushed a commit to bentasker/cpython that referenced this pull requestJun 23, 2023
This new exception type is raised instead of `NotImplementedError` whena path operation is not supported. It can be raised from `Path.readlink()`,`symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a futureversion of pathlib, it will be raised by `AbstractPath` for these methodsand others, such as `AbstractPath.mkdir()` and `unlink()`.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@encukouencukouencukou approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@barneygale@encukou@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp