diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-05-06 08:20:32 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-05-06 08:20:32 -0600 |
commit | 45761e6a15ce7d72391281819a123dc625611a8a (patch) | |
tree | f88722143e2f469a2fd9eddefc1e8930ed696ab2 /numpy/testing/numpytest.py | |
parent | b2b33470c8e2cce340a2d29abdf0dab7c7770e2d (diff) | |
download | numpy-45761e6a15ce7d72391281819a123dc625611a8a.tar.gz |
MAINT: Remove deprecated importall.
The importall function was the only function in the numpytest.py
file, so remove the whole file.
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r-- | numpy/testing/numpytest.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py deleted file mode 100644 index d83a21d83..000000000 --- a/numpy/testing/numpytest.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import division, absolute_import, print_function - -import os -import warnings - -__all__ = ['importall'] - - -def importall(package): - """ - `importall` is DEPRECATED and will be removed in numpy 1.9.0 - - Try recursively to import all subpackages under package. - """ - warnings.warn("`importall is deprecated, and will be remobed in numpy 1.9.0", - DeprecationWarning) - - if isinstance(package, str): - package = __import__(package) - - package_name = package.__name__ - package_dir = os.path.dirname(package.__file__) - for subpackage_name in os.listdir(package_dir): - subdir = os.path.join(package_dir, subpackage_name) - if not os.path.isdir(subdir): - continue - if not os.path.isfile(os.path.join(subdir, '__init__.py')): - continue - name = package_name+'.'+subpackage_name - try: - exec('import %s as m' % (name)) - except Exception as msg: - print('Failed importing %s: %s' %(name, msg)) - continue - importall(m) - return |