After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740219 - port to python3
port to python3
Status: RESOLVED DUPLICATE of bug 781321
Product: gnome-tweak-tool
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Tweak Tool maintainer(s)
GNOME Tweak Tool maintainer(s)
Depends on:
Blocks: python3
 
 
Reported: 2014-11-16 20:07 UTC by alex
Modified: 2017-08-28 19:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
python3 patch (14.01 KB, patch)
2014-11-16 20:07 UTC, alex
none Details | Review
Updated patch to gnome-tweak-tool (10.04 KB, patch)
2016-05-27 14:49 UTC, Amit Prakash Ambasta
none Details | Review
Updated patch to discard 2.x compatibility (14.66 KB, patch)
2016-06-30 07:47 UTC, Amit Prakash Ambasta
needs-work Details | Review

Description alex 2014-11-16 20:07:44 UTC
Created attachment 290810 [details] [review]
python3 patch

I ported gnome-tweak-tools to python3. Most probably the patch needs some refinement.
Comment 1 William Moreno 2015-05-11 20:32:58 UTC
+1

Please see: https://bugzilla.redhat.com/show_bug.cgi?id=1220007
Comment 2 Ruslan Makhmatkhanov 2016-04-24 14:29:11 UTC
Hi, any movement on this one? As I can see, changes introduced with the patch are quite trivial. It also easy to make some conditional checks to make it work both in python2 and python3. Is there any ETA on committing this? Thanks.
Comment 3 Michael Catanzaro 2016-05-11 13:20:03 UTC
(In reply to Ruslan Makhmatkhanov from comment #2)
> Hi, any movement on this one? As I can see, changes introduced with the
> patch are quite trivial. It also easy to make some conditional checks to
> make it work both in python2 and python3.

There's no value in supporting python2; this isn't a library.

> Is there any ETA on committing
> this? Thanks.

If someone could post an updated patch (I doubt that the 1.5 year old patch is going to work properly anymore) that would be great.
Comment 4 Ruslan Makhmatkhanov 2016-05-11 13:25:31 UTC
Ok, I'll try to sort this out soon.
Comment 5 Amit Prakash Ambasta 2016-05-27 14:49:56 UTC
Created attachment 328645 [details] [review]
Updated patch to gnome-tweak-tool

Updated patch vs gnome-tweak-tool 3.20
Comment 6 Michael Catanzaro 2016-05-31 16:57:40 UTC
Review of attachment 328645 [details] [review]:

Looks mostly good, but can you please also drop compatibility with python2 and change the shebang? There's no reason to support both pythons; this is an app, not a library.

For instance:

 * No use of __future__
 * No testing whether imports are available
Comment 7 Amit Prakash Ambasta 2016-06-30 07:47:24 UTC
Created attachment 330637 [details] [review]
Updated patch to discard 2.x compatibility
Comment 8 Michael Catanzaro 2016-06-30 14:03:22 UTC
Review of attachment 330637 [details] [review]:

Thanks.

::: old/gtweak/egowrapper.py
@@ +90,3 @@
+        pass
+
+        # Initializing url for no reason?

This function is unused. I'll remove it in a follow-up.
Comment 9 Michael Catanzaro 2016-06-30 14:05:11 UTC
Oh, I see Rui has been looking after tweak-tool recently... Rui, do you want to approve this? It looks straightforward; I was about to push.
Comment 10 Michael Catanzaro 2016-06-30 16:01:34 UTC
Rui says it's good to push, but I notice it doesn't work:

$ jhbuild run gnome-tweak-tool
Traceback (most recent call last):
  • File "/home/mcatanzaro/src/jhbuild/install/bin/gnome-tweak-tool", line 26 in <module>
    import gtweak
ImportError: No module named 'gtweak'

Comment 11 Amit Prakash Ambasta 2016-07-20 07:26:09 UTC
Any idea how I can run these tests without jhbuild?
Comment 12 Amit Prakash Ambasta 2016-07-20 07:51:20 UTC
This is my current output

>>> ~/.gtt/bin/gnome-tweak-tool -t -d
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Schema not translated org.gnome.shell (domain: gnome-shell)
DEBUG   : Caching gsettings: <gtweak.gsettings._GSettingsSchema: org.gnome.shell>
DEBUG   : Shell version: [3, 20, 3]
Comment 13 Michael Catanzaro 2016-07-20 19:12:12 UTC
(In reply to Amit Prakash Ambasta from comment #11)
> Any idea how I can run these tests without jhbuild?

Nope. It could be a jhbuild-specific issue. Unfortunately someone will have to dig in and figure it out for us to land this. :/
Comment 14 Jeremy Bicha 2017-05-27 13:30:35 UTC
*** Bug 771910 has been marked as a duplicate of this bug. ***
Comment 15 Jeremy Bicha 2017-05-30 02:46:21 UTC
Oops, we have two bugs for the same issue. I'm going to go ahead and mark this as a duplicate of the newer bug since I think the newer bug's patch is closer to being ready than this one is.

*** This bug has been marked as a duplicate of bug 781321 ***