diff options
author | kritisingh1 <kritisingh1.ks@gmail.com> | 2019-04-03 22:55:50 +0530 |
---|---|---|
committer | kritisingh1 <kritisingh1.ks@gmail.com> | 2019-04-05 19:32:18 +0530 |
commit | 4c35a853c2a09de5bdb236aa6bd97aa5ea18f195 (patch) | |
tree | f2a30746bf8d4da88791f4328146bccdee34bd95 /numpy/lib/utils.py | |
parent | 91a93ad54d6f5d8476f2af046b2895ef81e48c15 (diff) | |
download | numpy-4c35a853c2a09de5bdb236aa6bd97aa5ea18f195.tar.gz |
Issue deprecation warnings
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 718b55c4b..188a99d92 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -1098,6 +1098,9 @@ def safe_eval(source): Evaluate a string containing a Python literal expression without allowing the execution of arbitrary non-literal code. + .. deprecate:: 1.17 + safe_eval is deprecated + Parameters ---------- source : str @@ -1137,6 +1140,9 @@ def safe_eval(source): # Local import to speed up numpy's import time. import ast + # Numpy 1.17 + warnings.warn("SafeEval is deprecated in 1.17", + DeprecationWarning, stacklevel=2) return ast.literal_eval(source) |