Discussion:
future tuna development and Python 3
Guy Streeter
2014-07-29 22:07:10 UTC
Permalink
As far as I have been able to tell, Python 2 will continue to be distributed
in Fedora, at least for the foreseeable future. Upstream python developers say
they will continue to do security fixes and some bugfixes for python 2.7
through 2020, and possibly longer. Given this, I don't know how important
moving tuna to Python 3 really is.

It looks like it would be a significant undertaking if we do it. In addition
to the syntax changes, which are straightforward, there is the matter of the
Gtk implementation change, and then all of the module dependencies.

python-ethtool and python-schedutils are written in C, and I have no idea if
it's just a matter of recompiling to make them Python 3, or if they need to be
rewritten. python-linux-procfs is written in Python, so it should not be
difficult to port.

Personally, I really want to forget Python 2 and just write in Python 3 from
now on. I'd like to propose some enhancements to the tuna GUI (more on that in
another email), but I don't want to write them in Python 2, especially if they
need to be changed for Python 3 in the future.

Does anyone else have opinions (or knowledge) about Python 3 and future tuna
development? Would anyone like to collaborate on an attempt to port it?

thanks,
--Guy
David Sommerseth
2014-07-30 17:52:27 UTC
Permalink
Post by Guy Streeter
Personally, I really want to forget Python 2 and just write in Python 3 from
now on. I'd like to propose some enhancements to the tuna GUI (more on that in
another email), but I don't want to write them in Python 2, especially if they
need to be changed for Python 3 in the future.
I agree. Moving towards Python 3 is the future. But I'm glad Python 2
will be supported for a while, so the transition can go smoother and not
be rushed.

I'm also the upstream maintainer of python-ethtool, and I do poke at it
from time to time. Moving towards Python 3 is a bigger job, but not
impossible. But I'm also evaluating if another approach of integration
should be considered, in addition to remove some old and deprecated APIs.


--
kind regards,

David Sommerseth
Guy Streeter
2014-07-30 20:24:58 UTC
Permalink
Post by David Sommerseth
Post by Guy Streeter
Personally, I really want to forget Python 2 and just write in Python 3 from
now on. I'd like to propose some enhancements to the tuna GUI (more on that in
another email), but I don't want to write them in Python 2, especially if they
need to be changed for Python 3 in the future.
I agree. Moving towards Python 3 is the future. But I'm glad Python 2
will be supported for a while, so the transition can go smoother and not
be rushed.
I'm also the upstream maintainer of python-ethtool, and I do poke at it
from time to time. Moving towards Python 3 is a bigger job, but not
impossible. But I'm also evaluating if another approach of integration
should be considered, in addition to remove some old and deprecated APIs.
--
kind regards,
David Sommerseth
I checked the tuna code, and it uses get_active_devices() and get_module()
from python-ethtool. It wouldn't be hard to come up with that functionality in
an alternative way, so I don't think we have a really hard dependency there.

It occurred to me today that I have already written for another project a
Cython module that does everything we need python-schedutils to do. I could
break that out for tuna. It works just fine when compiled with Cython3.

python-linux-procfs is an odd collection of info parsed from /proc. I think
uplifting it to python3 is probably less work than finding alternative sources
for the information tuna gets from it.

I do have Cython modules that provide bindings for libnuma and libcgroup, in
case that's something tuna could use.

--Guy
Jiri Kastner
2014-07-31 07:40:40 UTC
Permalink
Post by Guy Streeter
Post by David Sommerseth
Post by Guy Streeter
Personally, I really want to forget Python 2 and just write in Python 3 from
now on. I'd like to propose some enhancements to the tuna GUI (more on that in
another email), but I don't want to write them in Python 2, especially if they
need to be changed for Python 3 in the future.
I agree. Moving towards Python 3 is the future. But I'm glad Python 2
will be supported for a while, so the transition can go smoother and not
be rushed.
I'm also the upstream maintainer of python-ethtool, and I do poke at it
from time to time. Moving towards Python 3 is a bigger job, but not
impossible. But I'm also evaluating if another approach of integration
should be considered, in addition to remove some old and deprecated APIs.
--
kind regards,
David Sommerseth
I checked the tuna code, and it uses get_active_devices() and get_module()
from python-ethtool. It wouldn't be hard to come up with that functionality in
an alternative way, so I don't think we have a really hard dependency there.
It occurred to me today that I have already written for another project a
Cython module that does everything we need python-schedutils to do. I could
break that out for tuna. It works just fine when compiled with Cython3.
python-linux-procfs is an odd collection of info parsed from /proc. I think
uplifting it to python3 is probably less work than finding alternative sources
for the information tuna gets from it.
I do have Cython modules that provide bindings for libnuma and libcgroup, in
case that's something tuna could use.
--Guy
can you please share via git{hub,orious} or another git repo?
Post by Guy Streeter
_______________________________________________
tuna-devel mailing list
tuna-devel at lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/tuna-devel
Guy Streeter
2014-07-31 17:44:50 UTC
Permalink
On 07/31/2014 02:40 AM, Jiri Kastner wrote:
...--Guy
Post by Jiri Kastner
can you please share via git{hub,orious} or another git repo?
git.fedorahosted.org/git/python-hwloc.git
A set of Python bindings for the hwloc library. This contains my "linuxsched"
module that does everything we need python-schedutils to do.

git.fedorahosted.org/git/python-libnuma.git
Python bindings for libnuma

git://fedorapeople.org/~streeter/python-libcgroup.git
Python bindings for libcgroup. I'll be moving this to fedorahosted as soon as
the project gets created.

I have Fedora 20 builds of all 3 in my copr repo:
https://copr.fedoraproject.org/coprs/streeter/python-hwloc/repo/fedora-20-x86_64/streeter-python-hwloc-fedora-20-x86_64.repo
or http://goo.gl/dutfFV

--Guy
Jiri Kastner
2014-08-01 09:45:24 UTC
Permalink
thanks
Post by Guy Streeter
...--Guy
Post by Jiri Kastner
can you please share via git{hub,orious} or another git repo?
git.fedorahosted.org/git/python-hwloc.git
A set of Python bindings for the hwloc library. This contains my "linuxsched"
module that does everything we need python-schedutils to do.
git.fedorahosted.org/git/python-libnuma.git
Python bindings for libnuma
git://fedorapeople.org/~streeter/python-libcgroup.git
Python bindings for libcgroup. I'll be moving this to fedorahosted as soon as
the project gets created.
https://copr.fedoraproject.org/coprs/streeter/python-hwloc/repo/fedora-20-x86_64/streeter-python-hwloc-fedora-20-x86_64.repo
or http://goo.gl/dutfFV
--Guy
_______________________________________________
tuna-devel mailing list
tuna-devel at lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/tuna-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/tuna-devel/attachments/20140801/952691de/attachment.sig>
Guy Streeter
2014-08-01 21:34:00 UTC
Permalink
Post by Guy Streeter
...--Guy
Post by Jiri Kastner
can you please share via git{hub,orious} or another git repo?
git.fedorahosted.org/git/python-hwloc.git
A set of Python bindings for the hwloc library. This contains my "linuxsched"
module that does everything we need python-schedutils to do.
git.fedorahosted.org/git/python-libnuma.git
Python bindings for libnuma
git://fedorapeople.org/~streeter/python-libcgroup.git
Python bindings for libcgroup. I'll be moving this to fedorahosted as soon as
the project gets created.
https://copr.fedoraproject.org/coprs/streeter/python-hwloc/repo/fedora-20-x86_64/streeter-python-hwloc-fedora-20-x86_64.repo
or http://goo.gl/dutfFV
I've moved python-libcgroup to fedorahosted
https://git.fedorahosted.org/git/python-libcgroup

Also, today I wrote the attached Python module that does the 2 things tuna
uses python-ethtool for. It works on python2 and python3.

--Guy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_ethtool.py
Type: text/x-python
Size: 1187 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/tuna-devel/attachments/20140801/1a070329/attachment.py>
Loading...