ENH: Migrate _multiarray_umath global variables to per-module state#31992
ENH: Migrate _multiarray_umath global variables to per-module state#31992prathamhole14 wants to merge 1 commit into
_multiarray_umath global variables to per-module state#31992Conversation
d9b01c3 to
dd4e3ca
Compare
|
This looks correct to me so far. Do we have module teardown tests to make sure the GC paths are hit? You can try adding a temporary debug print statement in the |
I Added temporary sys.stderr.flush()
n = gc.collect()
sys.stderr.flush()Also I am ready with the next commit locally, please let me know when can I push it! |
PR summary
Planner for this migration is this #31930 (comment), but instead of multiple PRs there will be multiple commits in this PR itself.
Related to: #31930
Request to reviewers
I am planning on having 7 major commits in this PR, first commit is for infra, then next 5 for all structs and the 7th is for scattered globals.
So at each stage before I push next commit I would like to get an approval, so I can maintain clean history and this might also turn out useful in future if we want to go back/revert a particular stage or in debugging.
AI Disclosure
Used AI (claude and gemini) for researching and finding out what I have to work on and writing comments (intentionally asked it to make comments verbose for now -- so they can be used as trackers and later I will make them concise) other than that most of the code, logic, and architecture were written by me.