bpo-28866: No type cache for types with specialized mro, invalidation is hard. by JulienPalard · Pull Request #13157 · python/cpython (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation13 Commits7 Checks0 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
_Py_IDENTIFIER(mro); |
---|
int unbound; |
PyObject *mro_meth = lookup_maybe_method( |
(PyObject *)type, &PyId_mro, &unbound); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mro_meth
needs to be checked for NULL before lookup_maybe_method
is called again.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK :-] is using a goto legit here? It'll avoid a bunch of if (clear == 0)
(see current impl).
@markshannon: Please replace #
with GH-
in the commit message next time. Thanks!
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
… is hard. (pythonGH-13157)
No type cache for types with specialized mro, invalidation is hard.
FIX: Don't disable method cache custom types that do not implement mro().
fixing implem.
Avoid storing error flags, also decref.
news entry
Clear as soon as we're getting an error.
FIX: Reference leak. (cherry picked from commit 180dc1b)
Co-authored-by: Julien Palard julien@palard.fr
miss-islington added a commit that referenced this pull request
…dation is hard. (GH-13157) (GH-13589)
No type cache for types with specialized mro, invalidation is hard.
FIX: Don't disable method cache custom types that do not implement mro().
fixing implem.
Avoid storing error flags, also decref.
news entry
Clear as soon as we're getting an error.
FIX: Reference leak. (cherry picked from commit 180dc1b)
Co-authored-by: Julien Palard julien@palard.fr
https://bugs.python.org/issue28866
DinoV pushed a commit to DinoV/cpython that referenced this pull request
… is hard. (python#13157)
No type cache for types with specialized mro, invalidation is hard.
FIX: Don't disable method cache custom types that do not implement mro().
fixing implem.
Avoid storing error flags, also decref.
news entry
Clear as soon as we're getting an error.
FIX: Reference leak.
sjpalt mannequin mentioned this pull request