Skip to content

[3.7] bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)#11910

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-ac28147-3.7
Feb 17, 2019
Merged

[3.7] bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)#11910
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-ac28147-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Feb 17, 2019

Copy link
Copy Markdown
Contributor

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

https://bugs.python.org/issue35992

…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>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@ilevkivskyi: Status check is done, and it's a success ✅ .

@miss-islington
miss-islington merged commit a7f929d into python:3.7 Feb 17, 2019
@miss-islington
miss-islington deleted the backport-ac28147-3.7 branch February 17, 2019 23:33
@miss-islington

Copy link
Copy Markdown
Contributor Author

@ilevkivskyi: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants