[Numpy-svn] r5334 - trunk/numpy/testing

numpy-svn@scip... numpy-svn@scip...
Wed Jul 2 21:35:02 CDT 2008


Author: alan.mcintyre
Date: 2008-07-02 21:34:59 -0500 (Wed, 02 Jul 2008)
New Revision: 5334

Modified:
   trunk/numpy/testing/numpytest.py
Log:
Deprecate set_package_path, set_local_path, and restore_path.


Modified: trunk/numpy/testing/numpytest.py
===================================================================
--- trunk/numpy/testing/numpytest.py	2008-07-03 02:23:34 UTC (rev 5333)
+++ trunk/numpy/testing/numpytest.py	2008-07-03 02:34:59 UTC (rev 5334)
@@ -38,6 +38,9 @@
 
       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 @@
 
       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 @@
     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)
 
-def restore_path():
     if DEBUG:
         print 'Removing %r from sys.path' % (sys.path[0])
     del sys.path[0]



More information about the Numpy-svn mailing list