DMTF/python-redfish-library

Python module 'six' really required?

UweSauter opened this issue · 4 comments

As far as I can tell the six module is used to provide Python 2 support.

I'm on CentOS 7, Python 3.6.8 is installed as well as python-six-1.9.0-2.el7 which is for Pyhton 2.

Trying a simple test written in Python 3 I get:

# python3 test.py 
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    import redfish
  File "/tmp/python-redfish-library-master/redfish/__init__.py", line 10, in <module>
    from redfish.rest.v1 import redfish_client
  File "/tmp/python-redfish-library-master/redfish/rest/v1.py", line 23, in <module>
    import six
ModuleNotFoundError: No module named 'six'

In CentOS there is no six module for Python 3, only in EPEL there exists python36-six.noarch.

Is it really necessary to load six inside Python 3 or could this be wrapped inside a version check?

Yes, it's a compatibility module so we can support Python2 and Python3 simultaneously. We have a separate issue (#101) opened where we're discussing the possibility of dropping Python2 support going forward.

At least from the discussions we've had on the issue I've referenced, we should be moving forward with dropping Python2 support. As part of that change, we'd also be removing the usage of the six module.