diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2019-02-17 23:13:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-17 23:13:46 (GMT) |
commit | ac28147e78c45a6217d348ce90ca5281d91f676f (patch) | |
tree | 891d00108f7066f1174788f72dd1696079950b68 /Misc | |
parent | 1bf8845f74013c5f1cc5f49a11e52c652a1fb9dd (diff) | |
download | cpython-ac28147e78c45a6217d348ce90ca5281d91f676f.zip cpython-ac28147e78c45a6217d348ce90ca5281d91f676f.tar.gz cpython-ac28147e78c45a6217d348ce90ca5281d91f676f.tar.bz2 |
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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2019-02-14-12-01-44.bpo-35992.nG9e2L.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-02-14-12-01-44.bpo-35992.nG9e2L.rst b/Misc/NEWS.d/next/Core and Builtins/2019-02-14-12-01-44.bpo-35992.nG9e2L.rst new file mode 100644 index 0000000..3d8dcd4 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-02-14-12-01-44.bpo-35992.nG9e2L.rst @@ -0,0 +1,2 @@ +Fix ``__class_getitem__()`` not being called on a class with a custom
+non-subscriptable metaclass.
|