Uh oh!
There was an error while loading. Please reload this page.
bpo-28866: No type cache for types with specialized mro, invalidation is hard. - #13157
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| _Py_IDENTIFIER(mro); | ||
| int unbound; | ||
| PyObject *mro_meth = lookup_maybe_method( | ||
| (PyObject *)type, &PyId_mro, &unbound); |
There was a problem hiding this comment.
mro_meth needs to be checked for NULL before lookup_maybe_method is called again.
There was a problem hiding this comment.
OK :-] is using a goto legit here? It'll avoid a bunch of if (clear == 0) (see current impl).
Uh oh!
There was an error while loading. Please reload this page.
markshannon
commented
May 26, 2019
LGTM |
bedevere-bot
commented
May 26, 2019
@markshannon: Please replace |
miss-islington
commented
May 26, 2019
Thanks @JulienPalard for the PR, and @markshannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
bedevere-bot
commented
May 26, 2019
GH-13589 is a backport of this pull request to the 3.7 branch. |
… 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>
…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
… 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.
This is an alternative implementation of #13117 based on @markshannon idea (https://bugs.python.org/issue28866#msg341581).
https://bugs.python.org/issue28866