bpo-43770: Refactor PyType_Ready() function#25336
bpo-43770: Refactor PyType_Ready() function#25336vstinner merged 2 commits intopython:masterfrom vstinner:type_ready
Conversation
* Split PyType_Ready() into sub-functions. * type_ready_mro() now checks if bases are static types earlier. * Check tp_name earlier, in type_ready_checks(). * Add _PyType_IsReady() macro to check if a type is ready.
| } | ||
|
|
||
|
|
||
| /* Some more special stuff */ |
There was a problem hiding this comment.
Nit: I'd either remove this comment, or write something more explanatory :)
There was a problem hiding this comment.
I tried to not make too many changes at once. After this large refactoring, I hope that it will be way easier to cleanup and enhance the code.
There was a problem hiding this comment.
I concur that the comment is useless :-) But I only moved it, I didn't want to rewrite it in this PR. My plan is to fix https://bugs.python.org/issue43770#msg390519 But I had to refactor the existing code since it was very fragile and hard to modify.
There was a problem hiding this comment.
I tried to not make too many changes at once.
No stress; it's hard enough to get nice diffs when refactoring :)
After this large refactoring, I hope that it will be way easier to cleanup and enhance the code.
The refactored code is much more comprehensible and self-documenting! Thank you :)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
https://bugs.python.org/issue43770