Multi-phase module initialisation (PEP 489) #1715

Open
scoder opened this Issue May 25, 2017 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

scoder commented May 25, 2017 edited

CPython 3.5 introduced a new module initialisation scheme in multiple phases:
https://www.python.org/dev/peps/pep-0489/

This improves the support for extension module reloading and could also allow running extension modules as main module (python -m) in the future (probably Py3.7).

Worth implementing. It requires splitting up the generate_module_init_func() method in https://github.com/cython/cython/blob/master/Cython/Compiler/ModuleNode.py to generate separate functions for the separate phases, and then also to find a compatible fallback way to execute them in older Python versions.

The proposed CPython support for runnable extension modules is tracked here: https://bugs.python.org/issue30403

Contributor

scoder commented Jul 22, 2017

Implemented in #1794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment