bpo-38994: Implement __class_getitem__ for PathLike#17498
bpo-38994: Implement __class_getitem__ for PathLike#17498miss-islington merged 2 commits intopython:masterfrom
Conversation
asvetlov
left a comment
There was a problem hiding this comment.
Adding __class_getitem__ to os.PathLike only is not enough for using, e.g. pathlib.Path[str] in runtime.
pathlib.PurePath should be modified in this way as well.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
@asvetlov I have made the requested changes; please review again |
|
Thanks for making the requested changes! @asvetlov: please review the changes made to this pull request. |
|
Awesome, thanks! |
| @@ -0,0 +1 @@ | |||
| Implement ``__class_getitem__`` for ``os.PathLike``, ``pathlib.Path`` | |||
There was a problem hiding this comment.
This news item is slightly misleading as the change was made to pathlib.PurePath, not pathlib.Path.
There was a problem hiding this comment.
And @isidentical forgot to give himself credit for the change. :)
|
Any reason not to document this? |
|
It is kind of irrelevant but I wrote a simple script to analyze typeshed and I think i found other classes with missing class getitems. Should I open an issue per class or just open one and fix all of them in one PR (I can tweak the comment change @brettcannon said in that PR). It is like 6-7 lines per class so i dont think it would make review harder. |
|
@isidentical individual is always easier to review, but if it's too much work you can try doing it in a single PR. |
|
@isidentical would you make a follow-up PR for fixing @brettcannon notes? |
|
Yes
…On Tue, Dec 10, 2019, 2:15 PM Andrew Svetlov ***@***.***> wrote:
@isidentical <https://github.com/isidentical> would you make a follow-up
PR for fixing @brettcannon <https://github.com/brettcannon> notes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17498?email_source=notifications&email_token=ALJKHQN2UMJNZNTHPSU4J2DQX525FA5CNFSM4JXO3CS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGO4CAI#issuecomment-563986689>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJKHQJAUGZFTMH57Q6EPHDQX525FANCNFSM4JXO3CSQ>
.
|
https://bugs.python.org/issue38994
Automerge-Triggered-By: @asvetlov