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 724803 - snippets plugin broken with Python 3.4
snippets plugin broken with Python 3.4
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: snippets
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-20 14:49 UTC by Marc Deslauriers
Modified: 2014-02-22 09:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix python 3.4 compatibility (1.16 KB, patch)
2014-02-20 14:54 UTC, Marc Deslauriers
committed Details | Review

Description Marc Deslauriers 2014-02-20 14:49:34 UTC
$ gedit
Traceback (most recent call last):
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/windowactivatable.py", line 57 in do_activate
    self.accel_group = Library().get_accel_group(None)
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 878 in get_accel_group
    self.ensure(language)
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 912 in ensure
    self.ensure_files()
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 930 in ensure_files
    self.add_user_library)
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 854 in find_libraries
    addcb(f)
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 834 in add_user_library
    return self.add_library(library)
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 794 in add_library
    library.ensure_language()
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 523 in ensure_language
    for element in self.parse_xml(256):
  • File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/library.py", line 456 in parse_xml
    parser = et.XMLTreeBuilder(target=builder)
AttributeError: 'module' object has no attribute 'XMLTreeBuilder'
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/windowactivatable.py", line 71, in do_deactivate
    if self.accel_group:
AttributeError: 'WindowActivatable' object has no attribute 'accel_group'


XMLTreeBuilder was changed to XMLParser in ElementTree 1.3. Python 3.4 dropped the compatibility XMLTreeBuilder object.

See downstream bug report:

https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1282607
Comment 1 Marc Deslauriers 2014-02-20 14:54:24 UTC
Created attachment 269808 [details] [review]
patch to fix python 3.4 compatibility
Comment 2 Ignacio Casal Quinteiro (nacho) 2014-02-20 14:55:37 UTC
Review of attachment 269808 [details] [review]:

Looks good.
Comment 3 Paolo Borelli 2014-02-22 09:45:26 UTC
Comment on attachment 269808 [details] [review]
patch to fix python 3.4 compatibility

thanks!