[issue34309] Trouble when reloading extension modules.

Shakeeb Alireza report at bugs.python.org
Sun Apr 11 22:22:57 EDT 2021


Shakeeb Alireza <shakeeb.alireza at gmail.com> added the comment:

In my project (https://github.com/shakfu/py-js), which provides an embedded python3 interpreter to Max/MSP in the form of an 'external' plugin, I have faced similar issues of being unable to reload extension modules, namely numpy, without reliably crashing the host application, in this case Max. 

Being able to reload extension modules cleanly is absolutely critical especially in case when python is embedded. Since Numpy is one of the key reasons why people would want to use Python, such a constraint, in this embedded context, becomes a sufficient reason not to use Python at all.

For example, I have recently taken note of similar frustration with this exact same issue from the VCV project (https://community.vcvrack.com/t/blowing-the-dust-off-python-in-prototype/12909). I quote: "I should add that CPython and more notably numpy do not support nor advise a complete restart of the interpreter in embedded scenarios without restarting the host process which kind of defeats our purpose in Prototype.
At that point I think I can safely take a step back and turn to the dev community looking for suggestions. Should we throw away numpy, or even python, altogether?"

----------
nosy: +shakfu
versions: +Python 3.9 -Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34309>
_______________________________________


More information about the Python-bugs-list mailing list