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 689272 - Overrides from different paths get mixed up
Overrides from different paths get mixed up
Status: RESOLVED DUPLICATE of bug 687335
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-29 13:02 UTC by Daniel Narvaez
Modified: 2013-02-27 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Narvaez 2012-11-29 13:02:29 UTC
Running ubuntu raring, which ships 3.7.2 and installing pygobject-3-4 HEAD in a different prefix, which I add to PYTHONPATH.

  • File "/home/alan/Documentos/GIT/sugar-build/install/lib/python2.7/site-packages/gi/module.py", line 244 in _load
    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  • File "/usr/lib/python2.7/dist-packages/gi/overrides/GObject.py", line 35 in <module>
    GObjectModule = gi.module.get_introspection_module('GObject')
AttributeError: 'module' object has no attribute 'get_introspection_module'

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.
Comment 1 Martin Pitt 2013-02-27 16:36:10 UTC

*** This bug has been marked as a duplicate of bug 687335 ***