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

jim jim.brown at rsmas.miami.edu
Mon Apr 16 16:08:31 UTC 2018


Why not add 'six' to third party and make it available from there?


On 4/16/2018 12:01 PM, 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpythonhosted.org%2Fsix%2F&data=02%7C01%7Cjim.brown%40miami.edu%7C117363128f53458d342508d5a3b36833%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636594913303852541&sdata=IsjrP8pgzHLBdqwAPw55G1nZaZE%2FVWN8eYyFWhVxH3E%3D&reserved=0
> 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?
> Noel
> [1] Note: not really looking for a review of this patch but rather the
> issue of the missing 'six' However this is part of
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsamba-team%2Fsamba%2Fpull%2F161&data=02%7C01%7Cjim.brown%40miami.edu%7C117363128f53458d342508d5a3b36833%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636594913303852541&sdata=Fq67adH8dI45NcFl%2FrKoBMt329NBARUXEZTLbQm%2BOL0%3D&reserved=0 :-)

More information about the samba-technical mailing list