gh-105035: fix super() calls on unusual types (e.g. meta-types) by carljm · Pull Request #105094 · python/cpython
carljm
marked this pull request as ready for review
facebook-github-bot pushed a commit to facebookincubator/cinder that referenced this pull request
Summary: This bug was discovered in the upstream `LOAD_SUPER_ATTR` implementation in 3.12b1, and it also exists in the Cinder implementation. `_PyObject_GetMethod` checks whether the type has a non-standard `tp_getattro` (i.e. not `PyObject_GenericGetAttr`), and if so, refuses to attempt the load-method optimization. We didn't have this check in the `super()` optimization, causing incompatible behavior in the case of a `super()` lookup on a type with unusual `tp_getattro`, e.g. meta-types. Upstream fix is python/cpython#105094 Reviewed By: mpage Differential Revision: D46281340 fbshipit-source-id: 41aba762d3e2925042a3d897a690317ba2767cf2
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
carljm
deleted the
superbadgetattro
branch
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