Skip to contentSkip to conversation

Userspace Python version

DISCUSSION Chris PeBenito 4 participants 5 messages Sep 8, 2017 – Sep 14, 2017 SELinux security module

lore
Share & tools
lore
#1 lore raw
Quoted 9 lines · Chris PeBenito

I believe that all major SELinux distributions have at least Python 3.4 support. Python 3 changeover has gone so long that even 3.3 is about to go end-of-life [1]. Can we officially drop Python 2.7 support in userspace code?

I'd like to drop support for everything older than Python 3.4 in SETools.

[1]
http://blog.python.org/2017/09/python-337rc1-is-now-available-prior-to.html

When I updated the Arch Linux packages for the last release, I tried to use Python 3 everywhere and there was one component which required Python 2: selinux-gui [1], because PyGtk is not compatible with Python
3. After a quick search I found https://askubuntu.com/a/97107 : "PyGTK has been deprecated in favor of PyGI+GTK. Because of that, a version of PyGTK for Python 3 was never written."

I will try to port selinux-gui to PyGI [2] in order to reduce the dependency towards Python 2. Before I start this work, are there already other people working on this? More precisely there have been some patches/commits related to this, like 9a57996dfa9a ("sandbox: Use GObject introspection binding instead of pygtk2") and 917f398d7cd2 ("policycoreutils: Use GObject introspection binding instead of python-gobject in selinux_server.py") and I am wondering whether their authors also looked at selinux-gui (and command system-config-selinux).

Cheers,
Nicolas

[1] directory gui/ of https://github.com/SELinuxProject/selinux
[2] with ideas from
https://wiki.gnome.org/action/show/Projects/PyGObject/IntrospectionPorting

#2 lore raw
Quoted 28 lines · Nicolas Iooss
Quoted 9 lines · Chris PeBenito

I believe that all major SELinux distributions have at least Python 3.4 support. Python 3 changeover has gone so long that even 3.3 is about to go end-of-life [1]. Can we officially drop Python 2.7 support in userspace code?

I'd like to drop support for everything older than Python 3.4 in SETools.

[1]
http://blog.python.org/2017/09/python-337rc1-is-now-available-prior-to.html

When I updated the Arch Linux packages for the last release, I tried to use Python 3 everywhere and there was one component which required Python 2: selinux-gui [1], because PyGtk is not compatible with Python
3. After a quick search I found https://askubuntu.com/a/97107 : "PyGTK has been deprecated in favor of PyGI+GTK. Because of that, a version of PyGTK for Python 3 was never written."

I will try to port selinux-gui to PyGI [2] in order to reduce the dependency towards Python 2. Before I start this work, are there already other people working on this? More precisely there have been some patches/commits related to this, like 9a57996dfa9a ("sandbox: Use GObject introspection binding instead of pygtk2") and 917f398d7cd2 ("policycoreutils: Use GObject introspection binding instead of python-gobject in selinux_server.py") and I am wondering whether their authors also looked at selinux-gui (and command system-config-selinux).

Quoted 6 lines

Cheers,
Nicolas

[1] directory gui/ of https://github.com/SELinuxProject/selinux
[2] with ideas from
https://wiki.gnome.org/action/show/Projects/PyGObject/IntrospectionPorting

This sounds about right. I know for sure all the commandline and important selinux stuff all works with python3. I dont really use selinux-gui. I didnt port it over when i did the big 2to3 patches since I dont really know gtk. I think some of the redhat guys did some fixes for it but not sure how comprehensive.

I have a mild preference for porting that to py3 before dropping it but I havent heard any issues on the gentoo side about py3 support since the last release so its probably fine.

Can the one that drops py2 be version 4.2? then if there do happen to be any small bugfixes they can continue on 4.1.x?

-- Jason

#3 lore raw
Quoted 42 lines · Jason Zaman
Quoted 28 lines · Nicolas Iooss
Quoted 9 lines · Chris PeBenito

I believe that all major SELinux distributions have at least Python 3.4 support. Python 3 changeover has gone so long that even 3.3 is about to go end-of-life [1]. Can we officially drop Python 2.7 support in userspace code?

I'd like to drop support for everything older than Python 3.4 in SETools.

[1]
http://blog.python.org/2017/09/python-337rc1-is-now-available-prior-to.html

When I updated the Arch Linux packages for the last release, I tried to use Python 3 everywhere and there was one component which required Python 2: selinux-gui [1], because PyGtk is not compatible with Python
3. After a quick search I found https://askubuntu.com/a/97107 : "PyGTK has been deprecated in favor of PyGI+GTK. Because of that, a version of PyGTK for Python 3 was never written."

I will try to port selinux-gui to PyGI [2] in order to reduce the dependency towards Python 2. Before I start this work, are there already other people working on this? More precisely there have been some patches/commits related to this, like 9a57996dfa9a ("sandbox: Use GObject introspection binding instead of pygtk2") and 917f398d7cd2 ("policycoreutils: Use GObject introspection binding instead of python-gobject in selinux_server.py") and I am wondering whether their authors also looked at selinux-gui (and command system-config-selinux).

Quoted 6 lines

Cheers,
Nicolas

[1] directory gui/ of https://github.com/SELinuxProject/selinux
[2] with ideas from
https://wiki.gnome.org/action/show/Projects/PyGObject/IntrospectionPorting

This sounds about right. I know for sure all the commandline and important selinux stuff all works with python3. I dont really use selinux-gui. I didnt port it over when i did the big 2to3 patches since I dont really know gtk. I think some of the redhat guys did some fixes for it but not sure how comprehensive.

Quoted 6 lines

I have a mild preference for porting that to py3 before dropping it but I havent heard any issues on the gentoo side about py3 support since the last release so its probably fine.

Can the one that drops py2 be version 4.2? then if there do happen to be any small bugfixes they can continue on 4.1.x?

That was my plan, as I want to use a few py3-specific features finally.

Signature · 1 line
Chris PeBenito
#4 lore raw
In reply to Chris PeBenito

On Sep 8, 2017 6:49 PM, "Chris PeBenito" <[email protected]> wrote:

I believe that all major SELinux distributions have at least Python 3.4 support. Python 3 changeover has gone so long that even 3.3 is about to go end-of-life [1]. Can we officially drop Python 2.7 support in userspace code?

I'd like to drop support for everything older than Python 3.4 in SETools.

[1] http://blog.python.org/2017/09/python-337rc1-is-now-availabl
e-prior-to.html

I would be fine with doing so.