summaryrefslogtreecommitdiff
path: root/numpy/testing/numpytest.py
diff options
context:
space:
mode:
authorAlan McIntyre <alan.mcintyre@local>2008-07-03 02:34:59 +0000
committerAlan McIntyre <alan.mcintyre@local>2008-07-03 02:34:59 +0000
commit0e2b76324de5d2423550db9ec5ff45bb2b01cc5f (patch)
treec1f9980aa17562170277519407ab0e4525b7b73d /numpy/testing/numpytest.py
parenta1be9e66bbbbb28a42cd51b8f2f0301dc25e1080 (diff)
downloadnumpy-0e2b76324de5d2423550db9ec5ff45bb2b01cc5f.tar.gz
Deprecate set_package_path, set_local_path, and restore_path.
Diffstat (limited to 'numpy/testing/numpytest.py')
-rw-r--r--numpy/testing/numpytest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/numpy/testing/numpytest.py b/numpy/testing/numpytest.py
index 4daa3bf8e..c3840a9e8 100644
--- a/numpy/testing/numpytest.py
+++ b/numpy/testing/numpytest.py
@@ -38,6 +38,9 @@ def set_package_path(level=1):
restore_path()
"""
+ warnings.warn("set_package_path will be removed in NumPy 1.3; please "
+ "update your code", DeprecationWarning, stacklevel=2)
+
from distutils.util import get_platform
f = get_frame(level)
if f.f_locals['__name__']=='__main__':
@@ -61,6 +64,9 @@ def set_local_path(reldir='', level=1):
restore_path()
"""
+ warnings.warn("set_local_path will be removed in NumPy 1.3; please "
+ "update your code", DeprecationWarning, stacklevel=2)
+
f = get_frame(level)
if f.f_locals['__name__']=='__main__':
testfile = sys.argv[0]
@@ -72,8 +78,10 @@ def set_local_path(reldir='', level=1):
sys.path.insert(0,local_path)
return
-
def restore_path():
+ warnings.warn("restore_path will be removed in NumPy 1.3; please "
+ "update your code", DeprecationWarning, stacklevel=2)
+
if DEBUG:
print 'Removing %r from sys.path' % (sys.path[0])
del sys.path[0]