On Mon, May 11, 2020 at 10:32:27AM +0200, Thierry Fournier wrote:
> Hi, thanks Willy,
> This a good idea to support python3.
> In facts, python2 is no longer supported, but it is not ready to disappear
> because a lot of scripts in many enterprises are written in python2
> (exemple: Centos7/RHEL7 the package manager yum is written in python2).
> In other way the spoe-server is newer and I guess it is not so used, so
> I should be a good idea to move to python3.
> So, its ok for me.

Thanks for the quick response. So that's now merged :-)

Gilchrist, thank you for this really clean work and the extensive
tests you've run on it.

If we notice there's more contribution to this code, maybe we'll have to
push one step further like we did to support many openssl versions, which
consists in always sticking to the most recent API and emulate it for the
old ones. In your case that would for example mean that instead of having
this :

  -      value = PyString_FromStringAndSize(args[i].name.str, args[i].name.len);
  +      value = PY_STRING_FROM_STRING_AND_SIZE(args[i].name.str, 

You would switch it to "PyUnicode_FromStringAndSize" (which is the new one
from python3) and add this in your compatibility layer to keep suppor for

  #define PyUnicode_FromStringAndSize  PyString_FromStringAndSize

That's something that can almost never be done in a single step, as it's
the best way to mix everything and cause breakage, but with your work
this seems to become within reach. But given that I don't know if we
should expect many contributions there, I don't know if it's worth
investing more time on it!


Reply via email to