summaryrefslogtreecommitdiff
path: root/numpy/_import_tools.py
diff options
context:
space:
mode:
authoralex <argriffi@ncsu.edu>2014-10-29 09:52:42 -0400
committeralex <argriffi@ncsu.edu>2014-10-29 09:52:42 -0400
commit4638475311228b099c278d5afc166c98c85bbc80 (patch)
treeccbc578f5470bf0b2eddb2c888ee3a884e6b9759 /numpy/_import_tools.py
parent7419906420307fc577a058a0c1a655869590eb01 (diff)
downloadnumpy-4638475311228b099c278d5afc166c98c85bbc80.tar.gz
MAINT: warn instead of raise
Diffstat (limited to 'numpy/_import_tools.py')
-rw-r--r--numpy/_import_tools.py8
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):