evalidate 2.1.2__tar.gz → 2.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evalidate
3
- Version: 2.1.2
3
+ Version: 2.1.4
4
4
  Summary: Validation and secure evaluation of untrusted python expressions
5
5
  Project-URL: Homepage, https://github.com/yaroslaff/evalidate
6
6
  Project-URL: Issues, https://github.com/yaroslaff/evalidate/issues
@@ -6,7 +6,7 @@ import ast
6
6
  import dataclasses
7
7
  from typing import Callable
8
8
 
9
- __version__ = '2.1.2'
9
+ __version__ = '2.1.4'
10
10
 
11
11
 
12
12
  class EvalException(Exception):
@@ -100,7 +100,8 @@ base_eval_model = EvalModel(
100
100
  "In", "NotIn", # "aaa" in i['list']
101
101
  "IfExp", # for if expressions, like: expr1 if expr2 else expr3
102
102
  "NameConstant", # for True and False constants
103
- "Div", "Mod"
103
+ "Div", "Mod",
104
+ "Is", "IsNot"
104
105
  ],
105
106
  )
106
107
 
@@ -86,7 +86,7 @@ def main():
86
86
  if r:
87
87
  out.append(p)
88
88
  c+=1
89
- except KeyError as e:
89
+ except (KeyError, NameError) as e:
90
90
  pass
91
91
  # print("Runtime exception:", e)
92
92