Hi! I'm porting my rlm_python to 2.0 right now and have noticed that _init and _destroy functions were removed from the module_t interface. What was the reasoning for that? Can I rely on _instantiate/_detach calls being serialized or I need to build my own locking around them? Thx. P.S. I assume that ideal solution will be to have no static data in the module and put everything into instance struct. However, in the real world real python has very basic support for multiple interpreters and still needs to be globally Py_Initialized.... -- Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key This message represents the official view of the voices in my head
Paul P Komkoff Jr wrote:
I'm porting my rlm_python to 2.0 right now and have noticed that _init and _destroy functions were removed from the module_t interface. What was the reasoning for that?
They weren't being used for any real purpose.
Can I rely on _instantiate/_detach calls being serialized or I need to build my own locking around them?
They are definitely serialized.
P.S. I assume that ideal solution will be to have no static data in the module and put everything into instance struct. However, in the real world real python has very basic support for multiple interpreters and still needs to be globally Py_Initialized....
A global variable is OK... Alan DeKok.
Replying to Alan DeKok:
A global variable is OK...
OK, I'm almost done. This should work. It countains various TODOs all over the place (which I will close later). I ran couple of trivial tests but not much, however, if there's anyone here struggling to make their python app working with 2.0 - please give this a try. Alan, can you please apply this to 2.0 and HEAD? Since this module is marked stable now, I want it to be fixed asap... My development git tree is at git://arcane.stingr.net/git/freeradius-dev, branch rlm_python Also accessible via gitweb at http://arcane.stingr.net/git/?p=freeradius-dev/.git;a=shortlog;h=rlm_python -- Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key This message represents the official view of the voices in my head
participants (2)
-
Alan DeKok -
Paul P Komkoff Jr