-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-46433: _PyType_GetModuleByDef: handle static types in MRO #30696
bpo-46433: _PyType_GetModuleByDef: handle static types in MRO #30696
Conversation
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
I'll still improve the change itself -- or feel free to beat me to it. The tests should be useful though. |
Ah, turns out I won't be able to optimize this further. @vstinner, since you did the optimization, could you look at this code? Did I miss something performance-related? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -1068,6 +1068,18 @@ def test_state_access(self): | |||
with self.assertRaises(TypeError): | |||
increment_count(1, 2, 3) | |||
|
|||
def test_get_module_bad_def(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may mention "bpo-46433" in a comment, here and in test_get_module_static_in_mro().
Thanks for the review! |
@encukou: Status check is done, and it's a success ✅ . |
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, @encukou, I could not cleanly backport this to |
Sorry @encukou, I had trouble checking out the |
GH-31262 is a backport of this pull request to the 3.10 branch. |
https://bugs.python.org/issue46433
Automerge-Triggered-By: GH:encukou