[pypy-commit] pypy default: remove and expose functions differently, fix test to pass
mattip
noreply at buildbot.pypy.org
Fri Feb 22 13:53:46 CET 2013
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r61602:74231eb5eee9
Date: 2013-02-22 14:03 +0200
http://bitbucket.org/pypy/pypy/changeset/74231eb5eee9/
Log: remove and expose functions differently, fix test to pass
diff --git a/lib_pypy/numpypy/core/__init__.py b/lib_pypy/numpypy/core/__init__.py
--- a/lib_pypy/numpypy/core/__init__.py
+++ b/lib_pypy/numpypy/core/__init__.py
@@ -1,3 +1,5 @@
from .fromnumeric import *
from .numeric import *
from .shape_base import *
+
+from _numpypy import abs, max, min
diff --git a/pypy/module/micronumpy/__init__.py b/pypy/module/micronumpy/__init__.py
--- a/pypy/module/micronumpy/__init__.py
+++ b/pypy/module/micronumpy/__init__.py
@@ -173,8 +173,16 @@
}
def setup_after_space_initialization(self):
space = self.space
- w_all = space.wrap(sorted(Module.interpleveldefs.keys() + \
- Module.appleveldefs.keys()))
+ alllist = sorted(Module.interpleveldefs.keys() + \
+ Module.appleveldefs.keys())
+ # found by set(numpypy.__all__) - set(numpy.__all__)
+ alllist.remove('min')
+ alllist.remove('max')
+ alllist.remove('bool')
+ alllist.remove('int')
+ alllist.remove('abs')
+ alllist.remove('typeinfo')
+ w_all = space.wrap(alllist)
space.setitem(self.w_dict, space.new_interned_str('__all__'), w_all)
if long_double_size == 16:
diff --git a/pypy/module/test_lib_pypy/numpypy/test_numpy.py b/pypy/module/test_lib_pypy/numpypy/test_numpy.py
--- a/pypy/module/test_lib_pypy/numpypy/test_numpy.py
+++ b/pypy/module/test_lib_pypy/numpypy/test_numpy.py
@@ -11,6 +11,7 @@
def test_min_max_after_import(self):
import __builtin__
+ from __builtin__ import *
from numpypy import *
assert min is __builtin__.min
More information about the pypy-commit
mailing list