Suggestions for rlm_python

Alan DeKok aland at deployingradius.com
Sun Nov 3 16:12:24 CET 2019


On Nov 3, 2019, at 5:04 AM, Geaaru <geaaru at gmail.com> wrote:
> 
> I began to work on rlm_python3 support. Unlucky, there are a lot of
> things to change because a lot of used methods must be changed, for
> example:
> 
> PyString_FromString -> PyUnicode_FromString
> 
> I think that also initialization of the module has also big changes.
> 
> So, how could be the right way to handle this module?

  We've already merged a rlm_python3 into the v3 branch.  We've had a few reports from people that it works.

  Can you double-check it?  We'd like to do 3.0.20 soon.

> Probably, for a period it's better to have two modules rlm_python (for
> 2.7) and rlm_python3 (for 3.x) but from another site, it's wrong to
> leave to the user the possibility of loading both modules. I dunno what
> happens with GIL, etc. with both modules loaded and probably it's
> better to avoid this.

  They're independent libraries, so it shouldn't be a problem.  If it is, well, don't use both modules.

> In addition, py 2.7 is EOL so probably it's better to avoid splitting.
> 
> It is not an easy choice.

  It's not an option to change the behaviour of the existing rlm_python.  So we've opted to go with a new module.

  Alan DeKok.




More information about the Freeradius-Devel mailing list