RFC: CI limitations and using 'six' module for python2/3 compatability

Stefan Metzmacher metze at samba.org
Mon Apr 16 20:25:40 UTC 2018

Am 16.04.2018 um 18:12 schrieb Alexander Bokovoy via samba-technical:
> On ma, 16 huhti 2018, Noel Power via samba-technical wrote:
>> Hi team,
>> I like to start a discussion about the use of 'six' (a python2/3
>> compatability layer api) https://pythonhosted.org/six/
>> Recently I have code across a couple of instances where I wanted to use
>> the 'six' library to port some samba python code to be python2/python3
>> compatible. Currently it is not possible to use 'six' as the CI machine
>> does not have it installed. I guess it is likely (I don't know) that the
>> autobuild machines also don't have it, does someone know ?
>> What is the possibility of getting the 'six' library in place it the CI
>> (and/or) autobuild machines?
>> For the moment my approach is to use the existing python/samba/compat.py
>> (currently not used) see attached patch [1] But.. I fear this is going
>> to become poor relation 'six' clone, my hope is using and extending this
>> is a temporary measure until we can kill it and replace it with six. The
>> transition from compat to six should be trivial e.g. and example of code
>> using the the existing content of the compat.py could be changed as follows
>>   -from samba.compat import urllib_quote
>>   +from six.moves.urllib.parse import urllib_quote
>> Thoughts?
> python-six is a good thing to use and it should already be available on
> all platforms we test against, either as a native package (python-six on
> Ubuntu/RHEL/CentOS, python{2,3}-six on Fedora) or can be installed with
> pip otherwise.
> I certainly would prefer using python-six to inventing our own
> compatibility code for those places where we have an overlap as
> python-six is quite widely used in Python community already.
> Metze, could we get it installed in autobuild?

python-six was already installed and I installed python3-six now.

We'd have to adjust .travis.yml too.
I'm not sure what's needed for gitlab.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180416/04b1cd9f/signature.sig>

More information about the samba-technical mailing list