diff options
author | alex <argriffi@ncsu.edu> | 2014-10-29 09:52:42 -0400 |
---|---|---|
committer | alex <argriffi@ncsu.edu> | 2014-10-29 09:52:42 -0400 |
commit | 4638475311228b099c278d5afc166c98c85bbc80 (patch) | |
tree | ccbc578f5470bf0b2eddb2c888ee3a884e6b9759 /numpy/_import_tools.py | |
parent | 7419906420307fc577a058a0c1a655869590eb01 (diff) | |
download | numpy-4638475311228b099c278d5afc166c98c85bbc80.tar.gz |
MAINT: warn instead of raise
Diffstat (limited to 'numpy/_import_tools.py')
-rw-r--r-- | numpy/_import_tools.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py index 07e41188a..9b1942e8d 100644 --- a/numpy/_import_tools.py +++ b/numpy/_import_tools.py @@ -2,6 +2,7 @@ from __future__ import division, absolute_import, print_function import os import sys +import warnings __all__ = ['PackageLoader'] @@ -162,9 +163,10 @@ class PackageLoader(object): postpone= : bool when True, don't load packages [default: False] - """ - raise DeprecationWarning('pkgload and PackageLoader are obsolete ' - 'and will be removed in a future version of numpy') + """ + warnings.warn('pkgload and PackageLoader are obsolete ' + 'and will be removed in a future version of numpy', + DeprecationWarning) frame = self.parent_frame self.info_modules = {} if options.get('force', False): |