[openstack-dev] Let's get rid of tablib and cliff-tablib

Victor Stinner vstinner at redhat.com
Mon Jun 29 10:01:27 UTC 2015


Le 29/06/2015 11:03, Thomas Goirand a écrit :
> cliff-tablib is used for the unit tests of things like
> python-neutronclient. The annoying bit is that cliff-tablib depends on
> tablib, which itself is a huge mess. It has loads of 3rd party embedded
> packages and most of them aren't Python 3.x compatible.

tablib includes copies of various dependencies in its tablib/packages/ 
directory. Some of them are for Python 2, others are for Python 3.

It would be better to use dependencies (requirements in setup.py), not 
copies. Do you try to contact tablib authors to ask them to remove 
completly tablib/packages/?

setup.py uses a different list of packages on Python 2 and Python 3.

I tried "python3 setup.py install": the bytecode compilation of 
markup.py fails with an obvious SyntaxError, the code is for Python 2. 
But there is also markup3.py which is compiled successfully.

Even if the compilation of the markup.py fails, "python setup.py 
install" succeed with the exit code 0. What is your problem?

setup.py should be fixed to skip markup.py on Python 3, and skip 
markup3.py on Python 2. A workaround is to remove manually the file 
depending on the Python major version.

Note: "pip install tablib" works on Python 3 (pip uses the binary wheel 

> I've seen that for python-openstackclient, recently, cliff-tablib was
> added. Let's do the reverse, and remove cliff-tablib whenever possible.
> If we really want to keep using cliff-tablib, then someone has to do the
> work to port tablib to Python3 (good luck with that...).

cliff-tablib is used in tests. If you remove the cliff-tablib 
dependency, tests will obviously fail.

What do you propose? Modify tests to reimplement cliff-tablib? Remove tests?


More information about the OpenStack-dev mailing list