[issue32973] Importing the same extension module under multiple names breaks non-reinitialisable extension modules
Stefan Behnel
report at bugs.python.org
Sat Aug 25 09:28:29 EDT 2018
Stefan Behnel <stefan_ml at behnel.de> added the comment:
I think the best work-around for now is to implement a bit of PEP 489, including a module create function that always returns the same static module reference instead of creating a new one after the first call, and a module exec function that simply returns if the module has already been initialised. Keeping a global pointer to the module instance around should work. This is what the current Cython master branch does (also to make use of some of the nice features that PEP 489 brings).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32973>
_______________________________________
More information about the Python-bugs-list
mailing list