[pygobject] Don't force loading of DynamicModule until set in sys.modules
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Don't force loading of DynamicModule until set in sys.modules
- Date: Wed, 23 Feb 2011 08:43:33 +0000 (UTC)
commit 3afbebeee486e14fd3f48552368903eb78f6b10c
Author: Laszlo Pandy <lpandy src gnome org>
Date: Tue Feb 22 21:37:33 2011 +0100
Don't force loading of DynamicModule until set in sys.modules
This fixes Tomeu's previous commit, which removed lazy loading.
Forcing the loading of a module before it is installed in sys.modules
prevents some overrides from being registered (namely Gtk.main_quit).
https://bugzilla.gnome.org/show_bug.cgi?id=642305
gi/importer.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/importer.py b/gi/importer.py
index e5733e4..1678e90 100644
--- a/gi/importer.py
+++ b/gi/importer.py
@@ -68,12 +68,12 @@ class DynamicImporter(object):
dynamic_module = DynamicModule(namespace)
modules[namespace] = dynamic_module
- dynamic_module.load()
dynamic_module.__file__ = '<%s>' % fullname
dynamic_module.__loader__ = self
sys.modules[fullname] = dynamic_module
+ dynamic_module.load()
return dynamic_module
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]