GNOME Bugzilla – Bug 771910
Default python version 3, need to manually specify python2 after every update
Last modified: 2017-06-07 01:41:27 UTC
I have python 3 as my default python version, so when a program like gnome-tweak-tool expects python2 instead (although IMHO ambiguously with just 'python') it gets messed up. I propose that instead of '#!/usr/bin/env python', it should be '#!/usr/bin/env python2'. I would issue a pull request, but I'm not sure how to do that.
Hi, Chris, You can just attach a patch here. There is a guide that should get you on the right track: https://wiki.gnome.org/Newcomers/CodeContributionWorkflow
Created attachment 336190 [details] [review] Changed the shebang to explicitly use python2 Gnome-tweak-tool used the ambiguous shebang: #!/usr/bin/env python Python3 is the default version on my system, and is referenced by this rather ambiguous call to python2. Explicitly setting the shebang to python2 fixes the problem Fix. Pretty simple fix Bugzilla link:
Ok I added the patch using the steps outlined in your link. It should be in the automatically generated attachment above. Let me know if there are any issues.
I believe we'll fix this by switching gnome-tweak-tool to python3 instead. *** This bug has been marked as a duplicate of bug 740219 ***
The problem is apparently nobody knows how to fix bug #740219, but clearly it's wrong for a program to expect /usr/bin/python to be python2, and this fix is trivial. So I would push this in the meantime.
Oops, I meant to mark this as a duplicate of bug 781321. I do expect that Tweak Tool 3.26 will use python3. After looking at PEP-0394 again, it does look like it is correct to change the shebang to python2 for now. https://www.python.org/dev/peps/pep-0394/
Review of attachment 336190 [details] [review]: thanks for the patch, I'll push one that also changes the lid inhibitor
Created attachment 352868 [details] [review] Explicitly call python2 on shebangs We'll migrate to python3 soon but for now let's be explicit with the python version we require since both 2 and 3 are now commonly installed everywhere.
Attachment 352868 [details] pushed as 7a0d422 - Explicitly call python2 on shebangs
*** Bug 766640 has been marked as a duplicate of this bug. ***