GNOME Bugzilla – Bug 781321
Port GNOME Tweak Tool to Python 3
Last modified: 2017-06-06 21:18:47 UTC
TL;DR port it to Python 3 so that distros don't need py2 gobject and py3 gobject. I'm going to attach a couple of patches here as I already have this work done. Just need a bugid to stick in my patches
Created attachment 349874 [details] [review] Port GNOME Tweak Tool to Python 3 This patch is for the GNOME 3.24 release update (gnome-3-24 branch)
Created attachment 349875 [details] [review] Port GNOME Tweak Tool to Python 3 Similar to the backport324 patch, this one is for git master
OK all patches added
OK please hold off on these for now a bug came up with the Python 3 conversion, when reading autostart files.
Created attachment 350391 [details] [review] Port GNOME Tweak Tool to Python 3 Updated patch for GTT 3.24 which resolves the locale issues
Created attachment 350392 [details] [review] Port GNOME Tweak Tool to Python 3 Replace older master-patch to port GTT git-master to Python 3
Uploaded 2 new patches, fixing the locale issue I ran into. Python 3 changed subprocess to default to returning bytes streams, which cannot be `.split(`
Review of attachment 349874 [details] [review]: This conversion is not appropriate for a stable bug-fix series.
Review of attachment 350391 [details] [review]: This isn't appropriate for the gnome-3-24 branch.
> This conversion is not appropriate for a stable bug-fix series. No explanation provided. > This isn't appropriate for the gnome-3-24 branch. Again, no explanation provided. Defeats the purpose of "review".
Ikey, I apologize for being too concise. Switching from Python2 to Python3 is inappropriate for a GNOME stable release when the code is frozen except for minimal bug fixes. (Switching the programming language to a major new version is not a minimal bug fix.) https://wiki.gnome.org/ThreePointTwentythree I am not really the maintainer of Tweak Tool so I'm not really able to give you a full review, but I might try out your patch later and reply here. I did ask rtcm to take a look at this bug. It's on his To Do list.
With that said, the main ticket items are: - Conceptually - are the bugfixes sound? i.e. the !shell crash - Can it be applied to master/future gtk4
The next stable version of GNOME is 3.26. New major GNOME releases happen every 6 months and there are no plans at this time for a GNOME 4. https://wiki.gnome.org/ThreePointTwentyfive So to answer your second question, yes, this would be nice to have in the next stable release. All I did earlier was to reject your GNOME 3.24 patch. The one against master is still open. I apologize if this was a bit confusing and if I was unclear. I really do appreciate your working on this patch since I'd like to see this conversion in time for Ubuntu 17.10 later this year too! :)
Review of attachment 350392 [details] [review]: You missed one print statement. Otherwise, your patch seems to work here!
+ Trace 237517
print result
In the Windows panel, the Titlebar Buttons toggle switches for Minimize and Maximize don't work: Traceback (most recent call last):
+ Trace 237520
self.set_active(sw.get_active())
rsplit.sort(cmp=sort_buttons)
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gtweak/widgets.py", line 535, in _on_toggled self.set_active(sw.get_active()) File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_windows.py", line 52, in set_active rsplit.remove(self.value) ValueError: list.remove(x): x not in list
The Global Dark Theme switch also isn't working.
*** Bug 771911 has been marked as a duplicate of this bug. ***
*** Bug 740219 has been marked as a duplicate of this bug. ***
Created attachment 352963 [details] [review] Port GNOME Tweak Tool to Python 3 I've updated the patch to changes on master for bug 783228. I didn't touch anything else, so comment #15 and #16 should still apply ...
Created attachment 352973 [details] [review] gtksettings: Fix another 2 -> 3 issue
Created attachment 352974 [details] [review] windows: Port from 'cmp' to 'key' function
The last two patches fix the dark- and maximize/minimize switches, feel free to squash ...
Created attachment 352977 [details] [review] windows: Port from 'cmp' to 'key' function Florian, here's an improved version of this patch to also handle window buttons on the left and keep the 'appmenu' key (needed if a user turns off Application Menu in the Top Bar panel). Also, I remove other values (like 'spacer') that Tweak Tool doesn't support right now, but which would break the sort function if present
Created attachment 352995 [details] [review] gtksettings: Create config directories as necessary Another bit for squashing
Review of attachment 352963 [details] [review]: Thanks! Florian, Ikey doesn't have git commit rights yet, so can you push this?
Review of attachment 352973 [details] [review]: ok
Review of attachment 352995 [details] [review]: This was already pushed.
Attachment 352963 [details] pushed as 4216c7a - Port GNOME Tweak Tool to Python 3 (In reply to Jeremy Bicha from comment #27) > Review of attachment 352995 [details] [review] [review]: > > This was already pushed. The python2 version, not this one :-)