[PATCH 00/13] Support Python 3
by Andy Grover
This patchset modifies the C part of ethtool to compile cleanly and
work with Python 3.
It's also available via git, here:
https://github.com/agrover/python-ethtool/tree/python3
See also https://bugzilla.redhat.com/show_bug.cgi?id=1018525 . which
has a v1 patch by asegurap(a)redhat.com that I unfortunately only
noticed just now :-(
I'd still suggest starting from this patchset, since it's already
broken up for review. Hopefully Antoni or someone can fixup the pure
Python parts and tests using 2to3 or from the v1 patch perhaps?
I have a pkg that depends on ethtool that I'd really like to convert
to Python 3, so please let me know how I can help speed the
transition.
Thanks -- Regards -- Andy
Andy Grover (13):
python3: Use print function
python3: getstatusoutput() moved to subprocess module
python3: Use -fno-strict-aliasing
python3: Use bytesobject.h and PyBytes_* instead of PyString_*
python3: Use PyLong_* instead of PyInt_*
python3: Use Py_TYPE() instead of self->ob_type
python3: Use PyVarObject_HEAD_INIT instead of PyObject_HEAD_INIT
python3: set PyEtherInfo.tp_flags to Py_TPFLAGS_DEFAULT
python3: Handle differences in module initialization
python3: Allow devname to be given as string or bytestring
python3: use tp_getset instead of tp_{get,set}attro
python3: Allow unicode strings as arg to get_interfaces_info
python3: Python3 expects str() and repr() to return strings not
bytestrings
python-ethtool/etherinfo.c | 9 +-
python-ethtool/etherinfo_obj.c | 224 ++++++++++++++++++++-------------------
python-ethtool/ethtool.c | 90 ++++++++++------
python-ethtool/netlink-address.c | 51 +++++----
setup.py | 16 ++-
5 files changed, 219 insertions(+), 171 deletions(-)
--
1.9.3
9 years, 5 months