GNOME Bugzilla – Bug 689272
Overrides from different paths get mixed up
Last modified: 2013-02-27 16:36:10 UTC
Running ubuntu raring, which ships 3.7.2 and installing pygobject-3-4 HEAD in a different prefix, which I add to PYTHONPATH.
+ Trace 231239
overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
GObjectModule = gi.module.get_introspection_module('GObject')
The problem is that my pygobject 3.4 is trying to import the GObject override in 3.7 which fails. I think it's caused by this code, which adds /usr/lib/python2.7/dist-packages/gi/overrides to __path__. # support overrides in different directories than our gi module from pkgutil import extend_path __path__ = extend_path(__path__, __name__) Importing overrides from any path on sys.path seems too greedy to me, but I'm not sure what would be an acceptable fix.
*** This bug has been marked as a duplicate of bug 687335 ***