Commit Graph

5 Commits

Author SHA1 Message Date
Windson yang d437012cdd bpo-36679: Rename duplicate test_class_getitem function (GH-12892) 2019-04-22 11:51:06 -07:00
Ivan Levkivskyi ac28147e78
bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)
Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional.
2019-02-17 23:13:46 +00:00
Serhiy Storchaka ce5b0e9db1
bpo-32226: Make __class_getitem__ an automatic class method. (#5098) 2018-01-05 00:21:41 +02:00
Serhiy Storchaka 45700fb757 Add tests for using PEP560 with classes implemented in C. (#4883)
Based on tests from #4878
2017-12-16 10:25:56 +01:00
Ivan Levkivskyi 2b5fd1e9ca
bpo-32226: Implementation of PEP 560 (core components) (#4732)
This part of the PEP implementation adds support for
__mro_entries__ and __class_getitem__ by updating
__build_class__ and PyObject_GetItem.
2017-12-14 23:32:56 +01:00