Author: Alex Gaynor <[email protected]>
Branch: numpy-back-to-applevel
Changeset: r51862:6deca798be13
Date: 2012-01-27 13:53 -0500
http://bitbucket.org/pypy/pypy/changeset/6deca798be13/
Log: Don't use __import__ with lots of arguments, it can results in
double imports and other silly stuff.
diff --git a/pypy/module/micronumpy/appbridge.py
b/pypy/module/micronumpy/appbridge.py
--- a/pypy/module/micronumpy/appbridge.py
+++ b/pypy/module/micronumpy/appbridge.py
@@ -11,8 +11,9 @@
def __init__(self, space):
self.w_import = space.appexec([], """():
def f():
- mod = __import__('numpypy.core._methods', {}, {}, [''])
- return mod
+ import sys
+ __import__('numpypy.core._methods')
+ return sys.modules['numpypy.core._methods']
return f
""")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit