[3.7] bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857) by miss-islington · Pull Request #11910 · python/cpython
…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. (cherry picked from commit ac28147) Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters