-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-39019: Implement missing __class_getitem__ for os.DirEntry #17561
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
84839e7
to
3435737
Compare
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.
Thanks! Couple comments also here.
Misc/NEWS.d/next/Library/2019-12-10-21-22-20.bpo-39019.SkVoG0.rst
Outdated
Show resolved
Hide resolved
@@ -12808,6 +12815,7 @@ static PyMethodDef DirEntry_methods[] = { | |||
OS_DIRENTRY_STAT_METHODDEF | |||
OS_DIRENTRY_INODE_METHODDEF | |||
OS_DIRENTRY___FSPATH___METHODDEF | |||
{"__class_getitem__", DirEntry_cls_getitem, METH_O|METH_CLASS, NULL}, |
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.
Would it be possible to use Argument Clinic for this (to be consistent with the rest of the code in this module)?
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.
I dont know if it possible, contextlib also uses argument clinic but they seperated __class_getitem
. I thought there is a catch about this but I can try to do this with argument clinic.
Co-Authored-By: Ivan Levkivskyi <[email protected]>
Closing since pep 585 accepted |
Hm, |
I was going to send a new PR but couldnt see it on PEP 585 |
https://bugs.python.org/issue39019