-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
bpo-46483: remove __class_getitem__ from pathlib.PurePath
#30848
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @@ -0,0 +1 @@ | |||
| Remove ``__class_getitem__`` from :class:`pathlib.PurePath` | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to:
- Give a one-sentence description of why it's being removed.
- Delete the news entry that was added in bpo-46483: change
PurePath.__class_getitem__to returnGenericAlias#30822 (it'll make for a pretty confusing changelog otherwise).
| @@ -0,0 +1 @@ | |||
| Remove ``__class_getitem__`` from :class:`pathlib.PurePath` | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Remove ``__class_getitem__`` from :class:`pathlib.PurePath` | |
| Remove ``__class_getitem__`` from :class:`pathlib.PurePath`. |
Misc/NEWS.d/next/Library/2022-01-24-13-00-09.bpo-46483.9XnmKp.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
Please add also a What's New entry (in the Removed section). I think in this case we can cut the deprecation period, as this feature was added by mistake and was unlikely used in user code. But it is still a breaking change which should be documented. |
|
Thank you! 🎉 |
@serhiy-storchaka proposed removing
__class_getitem__fromPurePath.CC @asvetlov and @isidentical as original PR authors: #17498
Why?
PurePathalways works withstr(unlikeos.PathLike[bytes | str]PurePathis not generic: https://github.com/python/typeshed/blob/35064a7f759facd7c3787ab6095964008f97d873/stdlib/pathlib.pyi#L20Related #30822
CC @corona10 as my mentor
https://bugs.python.org/issue46483