[Numpy-svn] r6495 - trunk/numpy/core

numpy-svn@scip... numpy-svn@scip...
Thu Feb 26 08:06:46 CST 2009


Author: cdavid
Date: 2009-02-26 08:06:42 -0600 (Thu, 26 Feb 2009)
New Revision: 6495

Modified:
   trunk/numpy/core/setup.py
Log:
Make a deepcopy of cached output to avoid side-effects.

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2009-02-26 14:06:29 UTC (rev 6494)
+++ trunk/numpy/core/setup.py	2009-02-26 14:06:42 UTC (rev 6495)
@@ -16,6 +16,7 @@
     import cPickle as _pik
 except ImportError:
     import pickle as _pik
+import copy
 
 class CallOnceOnly(object):
     def __init__(self):
@@ -26,7 +27,7 @@
             out = check_types(*a, **kw)
             self._check_types = _pik.dumps(out)
         else:
-            out = _pik.loads(self._check_types)
+            out = copy.deepcopy(_pik.loads(self._check_types))
         return out
 
 def pythonlib_dir():



More information about the Numpy-svn mailing list