Isolate the itertools extension module · Issue #101277 · python/cpython · GitHub
Skip to content

Isolate the itertools extension module #101277

@erlend-aasland

Description

@erlend-aasland

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:

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.

Linked PRs

Metadata

Metadata

Labels

type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions