[SSSD] [patch] Python 3 support for sssd

Jakub Hrozek jhrozek at redhat.com
Tue Jul 8 18:12:23 UTC 2014


On Tue, Jul 08, 2014 at 10:38:00AM -0400, Bohuslav Kabrda wrote:
> Hey all,
> for past few days, I've been working on python3-compat patch for sssd. The patch [1] is attached to the issue that requests this feature [2].

Awesome, thank you very much for the patch!

> Some comments:
> - The patch tries to maintain backward compatibility for Python 2.6 and 2.7 - I admit I only tested 2.7 so far, but it seemed to work ok.

The oldest OS release we support is RHEL-6. I haven't checked what
Ubuntu uses, but I would expect at least 2.7

> - I didn't yet solve the build part - for now, I just handedit
> configure.ac to set "PYTHON=python3" and src/external/python.m4 to set
> "AC_PATH_PROG(PYTHON, python3)" and compile with that.

This is fine for testing, but do you have some experience from other
projects on the best approach? I think we can help with coding up the
build system part, I'm just not sure what the right approach is..

> - I managed to run Python tests in src/tests except python-test.py itself (it says "OSError: [Errno 5] Could not initialize connection to the confdb" and I didn't yet investigate why that happens).

Yeah, don't worry about that one, it requires root currently because the
files are owned by root. I wonder if we should remove that test and the
python sysdb API altogether, I don't think anyone ever uses it.

> - To run tests, one must modify the hashbangs to /usr/bin/python3 (I now see that I left one of these in the actual patch, so please disregard that).

Maybe I miss something here, but if the changes are backwards
compatible, why does it matter to use python3 explicitly?

> 
> I'd like to ask you, sssd devels, to give me some comments on the patch (or ask questions) and if you have some time to spare, doing more extensive testing would also be very welcome.
> 
> -- 
> Regards,
> Bohuslav "Slavek" Kabrda.
> 
> [1] https://fedorahosted.org/sssd/attachment/ticket/2017/sssd-python3-compat.patch
> [2] https://fedorahosted.org/sssd/ticket/2017
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel



More information about the sssd-devel mailing list