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 696324 - gtester-report doesn't work with Python 3.x
gtester-report doesn't work with Python 3.x
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.35.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: python3
 
 
Reported: 2013-03-21 19:51 UTC by Jan de Groot
Modified: 2015-11-05 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix problem (2.16 KB, patch)
2013-03-21 19:52 UTC, Jan de Groot
committed Details | Review

Description Jan de Groot 2013-03-21 19:51:28 UTC
There's some indentation failures and a print statement that makes this script fail with Python 3.x. Attached is a patch to correct this. After patching the script still runs with Python 2.x
Comment 1 Jan de Groot 2013-03-21 19:52:15 UTC
Created attachment 239495 [details] [review]
Patch to fix problem
Comment 2 Jürg Billeter 2015-11-05 11:02:21 UTC
Adding this as blocker to the python3 tracker bug. The patch still applies and fixes the syntax issue. In addition to this, we should likely use @PYTHON@ in the hashbang line to use the configured Python version, following the same approach as gdbus-codegen.
Comment 3 Emmanuele Bassi (:ebassi) 2015-11-05 11:05:20 UTC
Review of attachment 239495 [details] [review]:

Looks good to me.
Comment 4 Emmanuele Bassi (:ebassi) 2015-11-05 11:05:52 UTC
(In reply to Jürg Billeter from comment #2)
> Adding this as blocker to the python3 tracker bug. The patch still applies
> and fixes the syntax issue. In addition to this, we should likely use
> @PYTHON@ in the hashbang line to use the configured Python version,
> following the same approach as gdbus-codegen.

Care to prepare a patch on top of this one?
Comment 5 Jürg Billeter 2015-11-05 11:54:12 UTC
Comment on attachment 239495 [details] [review]
Patch to fix problem

I just noticed that there is already an install-exec-hook that replaces the hashbang line as appropriate, so no change should be necessary there.

commit 4d74ca4c3ad3c9900caf320b39433e68a7db8465
Author: Jan de Groot <jan@jgc.homeip.net>
Date:   Thu Mar 21 19:51:28 2013 +0000

    Make gtester-report compatible with Python 3
    
    Convert tabs to spaces and replace print with print().
    The script still works with Python 2.x.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696324
Comment 6 Jürg Billeter 2015-11-05 11:54:41 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.