Author: Brian Kearns <[email protected]>
Branch:
Changeset: r70127:f29413fd44b7
Date: 2014-03-20 15:09 -0400
http://bitbucket.org/pypy/pypy/changeset/f29413fd44b7/
Log: fix builtin reimport/reload (test_zipimport_deflated failure)
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -465,13 +465,8 @@
if isinstance(w_mod, Module):
if not reuse and w_mod.startup_called:
# Create a copy of the module
- w_mod.getdict(self) # unlazy w_initialdict
- w_new = self.wrap(Module(self, w_name))
- self.call_method(w_new.getdict(self), 'update',
- w_mod.w_initialdict)
- w_mod = w_new
- else:
- w_mod.init(self)
+ w_mod = self.wrap(w_mod.__class__(self, w_name))
+ w_mod.init(self)
# Add the module to sys.modules
self.setitem(w_modules, w_name, w_mod)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit