Closed
Description
Feature or enhancement
Following https://github.com/ericsnowcurrently/multi-core-python/wiki/0-The-Plan we need to convert the itertools
extension module to use module state.
There are multiple static global type objects:
cpython/Tools/c-analyzer/cpython/globals-to-fix.tsv
Lines 338 to 359 in e244401
We need to convert these to heap types, add module state, and implement multi-phase init.
See also PEP-687.
I've got an old PR (#24065) that I'm planning on resurrecting. I'll re-submit it as multiple PRs; this is going to be a large change.
For this particular module, it could make sense to add a module state pointer to each type context, for easy and cheap state access.