rule-engine 5.0.0rc2__tar.gz → 5.0.2__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.
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/PKG-INFO +5 -3
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/README.rst +3 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/__init__.py +1 -1
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/builtins.py +3 -3
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/engine/_attribute_resolver.py +4 -1
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine.egg-info/PKG-INFO +5 -3
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/pyproject.toml +3 -3
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/LICENSE +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/_vendor/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/_vendor/ply/LICENSE +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/_vendor/ply/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/_vendor/ply/lex.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/_vendor/ply/yacc.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/base.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/binary/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/binary/arithmetic.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/binary/base.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/binary/comparison.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/expression/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/expression/access.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/expression/control.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/expression/resolution.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/ast/literal.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/debug_ast.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/debug_repl.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/engine/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/engine/context.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/engine/rule.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/errors.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/parser/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/parser/base.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/parser/utilities.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/suggestions.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/__init__.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/_object.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/coercion.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/dataclass.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/datatype.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/definitions.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine/types/sqlalchemy.py +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine.egg-info/SOURCES.txt +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine.egg-info/dependency_links.txt +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine.egg-info/requires.txt +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/lib/rule_engine.egg-info/top_level.txt +0 -0
- {rule_engine-5.0.0rc2 → rule_engine-5.0.2}/setup.cfg +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rule-engine
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
4
4
|
Summary: A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects.
|
|
5
5
|
Author-email: Spencer McIntyre <zeroSteiner@gmail.com>
|
|
6
6
|
Maintainer-email: Spencer McIntyre <zeroSteiner@gmail.com>
|
|
7
|
-
License: BSD
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
8
|
Project-URL: Homepage, https://github.com/zeroSteiner/rule-engine
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Environment :: Console
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
13
12
|
Classifier: Operating System :: OS Independent
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -30,6 +29,9 @@ A lightweight, optionally typed expression language with a custom grammar for ma
|
|
|
30
29
|
|
|
31
30
|
Documentation is available at https://zeroSteiner.github.io/rule-engine/.
|
|
32
31
|
|
|
32
|
+
:Warning:
|
|
33
|
+
Version 6.0 will remove support for Python version 3.10. There is currently no timeline for its release.
|
|
34
|
+
|
|
33
35
|
:Warning:
|
|
34
36
|
Version 5.0 removes support for Python versions 3.6, 3.7, 3.8, and 3.9 and deprecates attribute-style access on
|
|
35
37
|
``MAPPING`` values (use bracket syntax ``mapping["key"]`` instead). See the `Change Log`_ for details.
|
|
@@ -6,6 +6,9 @@ A lightweight, optionally typed expression language with a custom grammar for ma
|
|
|
6
6
|
|
|
7
7
|
Documentation is available at https://zeroSteiner.github.io/rule-engine/.
|
|
8
8
|
|
|
9
|
+
:Warning:
|
|
10
|
+
Version 6.0 will remove support for Python version 3.10. There is currently no timeline for its release.
|
|
11
|
+
|
|
9
12
|
:Warning:
|
|
10
13
|
Version 5.0 removes support for Python versions 3.6, 3.7, 3.8, and 3.9 and deprecates attribute-style access on
|
|
11
14
|
``MAPPING`` values (use bracket syntax ``mapping["key"]`` instead). See the `Change Log`_ for details.
|
|
@@ -55,7 +55,7 @@ def _builtin_parse_datetime(builtins: 'Builtins', string: str) -> datetime.datet
|
|
|
55
55
|
return parse_datetime(string, builtins.timezone)
|
|
56
56
|
|
|
57
57
|
def _builtin_random(boundary: Any = None) -> Any:
|
|
58
|
-
if boundary:
|
|
58
|
+
if boundary is not None:
|
|
59
59
|
if not types.is_natural_number(boundary):
|
|
60
60
|
raise errors.FunctionCallError('argument #1 (boundary) must be a natural number')
|
|
61
61
|
return random.randint(0, int(boundary))
|
|
@@ -73,10 +73,10 @@ def _builtin_parse_datetime_generator(builtins: 'Builtins') -> 'functools.partia
|
|
|
73
73
|
def _builtin_range(start: Any, stop: Any = None, step: Any = None) -> list[int]:
|
|
74
74
|
if not types.is_integer_number(start):
|
|
75
75
|
raise errors.FunctionCallError('argument #1 (start) must be an integer number')
|
|
76
|
-
if stop:
|
|
76
|
+
if stop is not None:
|
|
77
77
|
if not types.is_integer_number(stop):
|
|
78
78
|
raise errors.FunctionCallError('argument #2 (stop) must be an integer number')
|
|
79
|
-
if step:
|
|
79
|
+
if step is not None:
|
|
80
80
|
if not types.is_integer_number(step):
|
|
81
81
|
raise errors.FunctionCallError('argument #3 (step) must be an integer number')
|
|
82
82
|
return list(range(int(start), int(stop), int(step)))
|
|
@@ -313,7 +313,10 @@ class _AttributeResolver(object):
|
|
|
313
313
|
return functools.partial(self._value_ends_with, value)
|
|
314
314
|
|
|
315
315
|
def _value_ends_with(self, value: Sequence[Any], suffix: Sequence[Any]) -> bool:
|
|
316
|
-
|
|
316
|
+
# index from the front (len(value) - len(suffix)) rather than the back
|
|
317
|
+
# (-len(suffix)) so an empty suffix yields an empty slice instead of the
|
|
318
|
+
# whole value; value[-0:] is value[0:], which made ends_with('') False
|
|
319
|
+
return value[len(value) - len(suffix):] == suffix
|
|
317
320
|
|
|
318
321
|
@attribute('is_empty', types.DataType.ARRAY, types.DataType.BYTES, types.DataType.STRING, types.DataType.MAPPING, types.DataType.SET, result_type=types.DataType.BOOLEAN)
|
|
319
322
|
def value_is_empty(self, value: Sized) -> bool:
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rule-engine
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
4
4
|
Summary: A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects.
|
|
5
5
|
Author-email: Spencer McIntyre <zeroSteiner@gmail.com>
|
|
6
6
|
Maintainer-email: Spencer McIntyre <zeroSteiner@gmail.com>
|
|
7
|
-
License: BSD
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
8
|
Project-URL: Homepage, https://github.com/zeroSteiner/rule-engine
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Environment :: Console
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
13
12
|
Classifier: Operating System :: OS Independent
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -30,6 +29,9 @@ A lightweight, optionally typed expression language with a custom grammar for ma
|
|
|
30
29
|
|
|
31
30
|
Documentation is available at https://zeroSteiner.github.io/rule-engine/.
|
|
32
31
|
|
|
32
|
+
:Warning:
|
|
33
|
+
Version 6.0 will remove support for Python version 3.10. There is currently no timeline for its release.
|
|
34
|
+
|
|
33
35
|
:Warning:
|
|
34
36
|
Version 5.0 removes support for Python versions 3.6, 3.7, 3.8, and 3.9 and deprecates attribute-style access on
|
|
35
37
|
``MAPPING`` values (use bracket syntax ``mapping["key"]`` instead). See the `Change Log`_ for details.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
@@ -7,7 +7,8 @@ name = "rule-engine"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "A lightweight, optionally typed expression language with a custom grammar for matching arbitrary Python objects."
|
|
9
9
|
readme = "README.rst"
|
|
10
|
-
license =
|
|
10
|
+
license = "BSD-3-Clause"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
11
12
|
authors = [
|
|
12
13
|
{name = "Spencer McIntyre", email = "zeroSteiner@gmail.com"},
|
|
13
14
|
]
|
|
@@ -22,7 +23,6 @@ classifiers = [
|
|
|
22
23
|
"Development Status :: 5 - Production/Stable",
|
|
23
24
|
"Environment :: Console",
|
|
24
25
|
"Intended Audience :: Developers",
|
|
25
|
-
"License :: OSI Approved :: BSD License",
|
|
26
26
|
"Operating System :: OS Independent",
|
|
27
27
|
#"Programming Language :: Python :: 3.4", # dropped in v4.0
|
|
28
28
|
#"Programming Language :: Python :: 3.5", # dropped in v4.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|