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 695199 - 3.7.91 regression: KeyError: 'You have tried to modify the registry outside of the overrides module. This is not allowed' with gedit
3.7.91 regression: KeyError: 'You have tried to modify the registry outside o...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal critical
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-05 10:41 UTC by Martin Pitt
Modified: 2013-03-05 11:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Pitt 2013-03-05 10:41:03 UTC
From downstream bug https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/1146567:

Running gedit on current raring with gedit-plugins installed and "codecomment" activated gives those errors:

  • File "/usr/lib/gedit/plugins/codecomment.py", line 24 in <module>
    from gi.repository import GObject, Gtk, GtkSource, Gedit
  • File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 68 in load_module
    dynamic_module._load()
  • File "/usr/lib/python2.7/dist-packages/gi/module.py", line 291 in _load
    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  • File "/usr/lib/python2.7/dist-packages/gi/overrides/Gedit.py", line 74 in <module>
    @override(Gedit.debug_plugin_message)
  • File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 56 in override
    registry.register(type_)
  • File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 48 in register
    self[override_class] = override_class
  • File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 35 in __setitem__
    raise KeyError('You have tried to modify the registry outside of the overrides module. This is not allowed')
KeyError: 'You have tried to modify the registry outside of the overrides module. This is not allowed'

(gedit:16285): libpeas-WARNING **: Error loading plugin 'codecomment'
Comment 1 Martin Pitt 2013-03-05 10:44:10 UTC
This looks like fallout from bug 686835, apparently Simon was right and other modules use @override with functions as well.
Comment 2 Simon Feltman 2013-03-05 10:56:16 UTC
That's too bad, at least it was caught now! I think the whole thing will probably need to be put back because if there are overrides relying on @override also clobbering the original instead of using __all__, they will break (or the function override would not be available). The right approach to bug 686835 should probably be to stash the override in the registry instead of clobbering the original gi module, but there is also no rush for any of this...