GNOME Bugzilla – Bug 659824
[giscanner]: docbookdescription.py fails to compile using python2.6
Last modified: 2015-02-26 19:54:28 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.
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.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
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.