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 659824 - [giscanner]: docbookdescription.py fails to compile using python2.6
[giscanner]: docbookdescription.py fails to compile using python2.6
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-09-22 13:16 UTC by Gert Kulyk
Modified: 2015-02-26 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gert Kulyk 2011-09-22 13:16:05 UTC
While during build everything seems to work fine, trying to package gobject-introspection and running pycompile on postinstall with python2.6 (as debian would do it), I get the following error:

SyntaxError: ('invalid syntax', ('/usr/lib/gobject-introspection/giscanner/docbookdescription.py', 4, 28, "TAGS = {TAG_PROGRAM_LISTING, TAG_CDATA, ']]>', '</programlisting>'}\n"))

During package compilation it seems like the same happens without an error shown, because docbookdescription.pyc is never created with python2.6.

What is working for me is to replace {}-braces with []-ones around the mentioned statement, but because I'm no python programmer I don't know if this is a correct approach.
Comment 1 Nirbheek Chauhan 2011-09-27 11:36:16 UTC
Reproduced, here. {a, b, c} is the syntax for a mutable set, added in Python 3, and backported to Python 2.7, it won't work with anything before that.

http://docs.python.org/whatsnew/2.7.html

Hence, least-impact change is to use set() instead of {}. However, from the usage, it looks like we want an ordered list, so (,) or [] is probably best.
Comment 2 André Klapper 2015-02-07 17:11:05 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 3 Dieter Verfaillie 2015-02-26 19:54:28 UTC
Looks like docbookdescription.py was removed 3 years ago in https://git.gnome.org/browse/gobject-introspection/commit/?id=932946f4071d1d5551e3930c113a2a1d47e95c8c

Thanks for taking the time to report this.
However, you are using a version that is too old and not supported anymore by GNOME developers. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use.

By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME.

Please feel free to reopen this bug report if the problem still occurs with a recent version of GNOME, or feel free to report this bug in the bug tracking system of your Linux distribution if your distribution still supports the version that you are using.