You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we need to add CYTHON_USE_MODULE_STATE to the CYTHON_ABI suffix? I think it might be OK without but there's the potential to go wrong.
Is there a lifetime issue? In principle modules can now be unloaded (although in practice I don't think our reference counting is accurate enough for this to happen...). If we store CyFunction in our shared ABI based on loading it from module a, and then unload module a does this cause a problem? I think it might.
__Pyx_Coroutine_get_frame will always get the globals from whichever module added it to the shared ABI.
I think this is all mostly a theoretical problem, but it's all a bit dubious.
The text was updated successfully, but these errors were encountered:
For point 2 - I think we need to disable internal type-checks with CYTHON_USE_MODULE_STATE. i.e. it's fine for other utility code to check if something is a CyFunction, but it's not fine for CyFunctions to check if something is a CyFunction (although for CyFunction specifically there might be a way of doing it).
I think that mainly affects Coroutines and related types. I think these checks are only an optimization though so they're OK to drop.
I'm also not convinced __Pyx_Coroutine_Check and __Pyx_Coroutine_CheckExact are used correctly in all cases even without module state. They're mostly just used for optimization (where it doesn't really matter if it misses) but there's a few cases where it affects behaviour. Can't see an obvious way around that though.
Describe your issue
CYTHON_USE_MODULE_STATE
to theCYTHON_ABI
suffix? I think it might be OK without but there's the potential to go wrong.a
, and then unload modulea
does this cause a problem? I think it might.__Pyx_Coroutine_get_frame
will always get the globals from whichever module added it to the shared ABI.I think this is all mostly a theoretical problem, but it's all a bit dubious.
The text was updated successfully, but these errors were encountered: