This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scoder
Recipients Arfrever, Dormouse759, amaury.forgeotdarc, asvetlov, brett.cannon, eric.snow, eudoxos, gregory.p.smith, ncoghlan, petr.viktorin, pitrou, r.david.murray, scoder, twouters, vstinner
Date 2018-08-25.13:28:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535203709.81.0.56676864532.issue32973@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2018-08-25 13:28:30scodersetrecipients: + scoder, twouters, brett.cannon, gregory.p.smith, amaury.forgeotdarc, ncoghlan, pitrou, vstinner, Arfrever, r.david.murray, petr.viktorin, asvetlov, eric.snow, eudoxos, Dormouse759
2018-08-25 13:28:29scodersetmessageid: <1535203709.81.0.56676864532.issue32973@psf.upfronthosting.co.za>
2018-08-25 13:28:29scoderlinkissue32973 messages
2018-08-25 13:28:29scodercreate