jsonatapy 2.2.13__tar.gz → 2.2.15__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.
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/CHANGELOG.md +225 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/Cargo.lock +6 -138
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/Cargo.toml +4 -4
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/PKG-INFO +6 -6
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/README.md +3 -3
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/pyproject.toml +6 -4
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/__main__.py +1 -1
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/ast.rs +44 -1
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/ast_transform.rs +984 -680
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/builtins.rs +255 -23
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/compiler.rs +1 -1
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/datetime.rs +600 -151
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/evaluator.rs +1021 -275
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/functions.rs +485 -19
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/parser.rs +138 -997
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/signature.rs +71 -4
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/value.rs +67 -3
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/vm.rs +2 -1
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/evaluator_reuse_test.rs +1 -1
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/path_semantics_combinations.json +393 -1
- jsonatapy-2.2.15/tests/fixtures/path_semantics_combinations_known.json +4 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/integration_test.rs +1194 -12
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/path_semantics_test.rs +0 -5
- jsonatapy-2.2.13/tests/fixtures/path_semantics_combinations_known.json +0 -4
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.gitignore +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.gitmodules +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/.gitignore +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/architecture.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/conventions.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/core.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/memory_maintenance.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/suggested_commands.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/task_completion.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/.serena/memories/tech_stack.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/CONTRIBUTORS.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/LICENSE +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/SECURITY.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/benches/evaluator_bench.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/bindings/c/README.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/bindings/c/examples/smoke.c +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/bindings/c/jsonata.h +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/examples/evaluator_demo.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/examples/host_functions.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/examples/parser_demo.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/examples/simd_json_bench.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/__init__.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/_cli/__init__.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/_cli/bindings.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/_cli/error_format.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/_cli/mcp_server.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/_cli/resolve.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/_cli/run.py +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/python/jsonatapy/py.typed +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/allocator.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/bin/jsonata/bindings.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/bin/jsonata/error_format.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/bin/jsonata/main.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/bin/jsonata/resolve.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/capi.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/expression.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/lazy.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/lib.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/src/pystack.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/study/cli_fixtures.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/study/cli_fixtures_testdata.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/study/cli_spec.md +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/array_flags_test.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/cli_fixtures_test.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/cli_test.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/common/mod.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/datetime_picture_suite.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/deep_value_drop_test.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/array_flags_differential.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/builtin_arity.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/builtin_differential.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/builtin_signatures.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/fastpath_differential.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/fastpath_known_divergences.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/fixtures/path_semantics_differential.json +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/host_functions_test.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/lambda_closure_suite.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/parent_and_focus_binding_suite.rs +0 -0
- {jsonatapy-2.2.13 → jsonatapy-2.2.15}/tests/step_cache_test.rs +0 -0
|
@@ -19,6 +19,231 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
19
|
|
|
20
20
|
### Security
|
|
21
21
|
|
|
22
|
+
## [2.2.15] - 2026-11-18
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **Breaking for Rust users of the AST:** `parser::Parser::parse` now returns the finished
|
|
29
|
+
tree, with ancestry resolved, as `parser::parse` does, and `ast_transform::resolve_ancestry`
|
|
30
|
+
is no longer public. `BinaryOp` has the raw path operators `Map`, `Filter` and `KeepArray`,
|
|
31
|
+
and `AstTransformError` has `Syntax`, so an exhaustive match on either needs the new arms.
|
|
32
|
+
`PathStep` has a `runs_on_nothing` cache field (`StepCache::default()` in a struct literal).
|
|
33
|
+
This doesn't call for a major version: the AST is an internal representation, not a
|
|
34
|
+
supported API. `parse()`, `Expression::compile`, the C API and the Python package are
|
|
35
|
+
unchanged, so the release stays on 2.x.
|
|
36
|
+
- **Less per-call work from the #254 and #260 fixes**
|
|
37
|
+
([#288](https://github.com/txjmb/jsonata-core/issues/288)). The closure that wraps a function
|
|
38
|
+
argument no longer copies the function's parameter names, and whether a step's filters run on
|
|
39
|
+
nothing is worked out the first time the step runs and kept on the step.
|
|
40
|
+
|
|
41
|
+
### Deprecated
|
|
42
|
+
|
|
43
|
+
### Removed
|
|
44
|
+
|
|
45
|
+
- **The `chrono` dependency.** RUSTSEC-2026-0543 marks it unmaintained, with no fixed
|
|
46
|
+
release. The date arithmetic `$fromMillis`, `$toMillis` and `$now` need (UTC calendar
|
|
47
|
+
dates, weekdays, ISO week numbers) is now a small calendar type in `src/datetime.rs`,
|
|
48
|
+
computing on the proleptic Gregorian calendar as JavaScript's `Date` does. Output is
|
|
49
|
+
unchanged except at the edge below.
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- **`$now()` and `$millis()` report one timestamp per evaluation, as in jsonata-js**
|
|
54
|
+
([#294](https://github.com/txjmb/jsonata-core/issues/294)). The clock was read on every
|
|
55
|
+
call, so two calls in one expression could disagree.
|
|
56
|
+
- **`$fromMillis` takes the whole range of a JavaScript date**, ±8.64e15 milliseconds
|
|
57
|
+
(years -271821 to 275760). It stopped at chrono's ±262143 years.
|
|
58
|
+
It also takes a fraction of a millisecond, dropping it as JavaScript's `Date` does, where it
|
|
59
|
+
raised "requires an integer".
|
|
60
|
+
- **`$toMillis` returns what jsonata-js does across its edge cases**
|
|
61
|
+
([#295](https://github.com/txjmb/jsonata-core/issues/295)). With a picture, the timestamp is
|
|
62
|
+
built as `Date.UTC` builds it: a field past its range carries into the next (`"2018-02-30"`
|
|
63
|
+
with `"[Y]-[M]-[D]"` is 2 March, hour 24 is the next midnight, month 13 is January of the
|
|
64
|
+
next year), a two-digit year is in the 1900s, a day of the year past the year's end keeps
|
|
65
|
+
the parsed year, and a component of 0 counts as not given when choosing the date and time
|
|
66
|
+
types, as jsonata-js's truthiness test does (so `"0:33 am"` with `"[h]:[m] [P]"` is D3136).
|
|
67
|
+
Components the picture leaves out come from the evaluation's timestamp, and the timezone
|
|
68
|
+
offset is applied in floating point. Without a picture, the timestamp is read as
|
|
69
|
+
`Date.parse` reads it: a day up to 31 carries over, `T24:00:00` is the next midnight, and
|
|
70
|
+
the pattern that decides D3110 is jsonata-js's own. A date past JavaScript's range, a month
|
|
71
|
+
or day of 0, a month over 12 or a day over 31 is NaN, as in jsonata-js (`nan` in Python);
|
|
72
|
+
these were D3136 or D3110. A fraction or a numeric offset with no time is NaN, as
|
|
73
|
+
V8's `Date.parse` gives, except that V8's fallback parser reads `"2018.5"` as 1 May and
|
|
74
|
+
`"2018-01.5"` as 5 January, which are NaN here. A date-time with no offset is still read as
|
|
75
|
+
UTC, where `Date.parse` uses the host's time zone.
|
|
76
|
+
- **Arithmetic checks each operand in jsonata-js's order.** A NaN operand is T2001/T2002
|
|
77
|
+
(`(0/0) + 1` returned undefined), and the left side is checked before the right, so
|
|
78
|
+
`"a" + (1/0)` is T2001 rather than D1001.
|
|
79
|
+
- **`$type` and `$number` on NaN and Infinity match jsonata-js.** `$type` of NaN (such as an
|
|
80
|
+
invalid `$toMillis` date) is `"object"`, and of Infinity is D1001. `$number` returns any
|
|
81
|
+
number as it is, so `$number(1/0)` is Infinity rather than D3030.
|
|
82
|
+
- **Week numbers and day of the year for years 0 to 99 match jsonata-js**, which reads those
|
|
83
|
+
years as 1900 to 1999 when it works them out (`Date.UTC`).
|
|
84
|
+
- **`$encodeUrl` and `$encodeUrlComponent` encode what JavaScript's `encodeURI` and
|
|
85
|
+
`encodeURIComponent` do.** `$encodeUrl("a b")` is `"a%20b"`, where it was `"a b"`: only
|
|
86
|
+
control characters were encoded. `$encodeUrlComponent` no longer encodes `-_.!~*'()`.
|
|
87
|
+
- **`$now(picture, timezone)` formats the time as `$fromMillis` does, as in jsonata-js.** It
|
|
88
|
+
was T0410.
|
|
89
|
+
|
|
90
|
+
- **A `[]` after a group-by on a path keeps the `~>` result an array, as in jsonata-js**
|
|
91
|
+
([#292](https://github.com/txjmb/jsonata-core/issues/292)). `o.b{"k":$}[] ~> $map(f)` is
|
|
92
|
+
`[{"k":1}]`, where it was `{"k":1}`; a `[]` before the group-by (`o.b[]{"k":$}`) still keeps
|
|
93
|
+
nothing there. `$filter` of a single value gives a one-item sequence, as in jsonata-js, so
|
|
94
|
+
`o.b{"k":$}[] ~> $filter(f)` keeps the array too. In the Rust AST, such a `[]` is now a `KeepArray` stage on a one-step path
|
|
95
|
+
around the `ObjectTransform`, not a stage of the path's last step.
|
|
96
|
+
- **A builtin's partial application takes the parameters jsonata-js's function declares**
|
|
97
|
+
([#292](https://github.com/txjmb/jsonata-core/issues/292)). An argument past the builtin's
|
|
98
|
+
parameters is dropped (`$sum(?, 1)` given `[1,2]` is 3, and `$zip(?, [1])` given `[2]` is
|
|
99
|
+
`[[2]]`), and a trailing undefined one isn't passed (`$millis(?)()` and `$now(?)()` give the
|
|
100
|
+
time, where they were T0410). `$string(?)` is S0208, as in jsonata-js, whose `$string`
|
|
101
|
+
declares `prettify = false`, which doesn't parse as a parameter name; it was a function.
|
|
102
|
+
|
|
103
|
+
- **A group-by over a block whose path stops before its tuple step groups once, as in
|
|
104
|
+
jsonata-js** ([#285](https://github.com/txjmb/jsonata-core/issues/285)). jsonata-js enters
|
|
105
|
+
tuple mode only when a path reaches a tuple step, so `(%.b)[%.x]{"k":1}.k` and
|
|
106
|
+
`(nope.b)[%.x]{"k":1}.k` are `1`, where they were undefined, and `nope^(d)#$i{"k":1}` and
|
|
107
|
+
`c[d=9].(nope.b)[%.x]{"k":1}` and `c[d=9].d#$i^($){"k":1}` are `{"k":1}`, where they were `{}`. A path that starts with a sort
|
|
108
|
+
of such a block is a tuple stream, since the sort is a tuple step itself:
|
|
109
|
+
`(nope.b)[%.x]^(x){"k":1}.k` is `{}`, where it was `{"k":1}`.
|
|
110
|
+
|
|
111
|
+
- **A filter or group-by on the call after `~>` is ignored, as in jsonata-js**
|
|
112
|
+
([#286](https://github.com/txjmb/jsonata-core/issues/286)). jsonata-js applies the call and
|
|
113
|
+
never reads its filters or group-by; only `[]` carries over, and a `[]` on the left side or on a
|
|
114
|
+
function value on the right (`$x[] ~> $f`, `x ~> $f[]`) now keeps a single result as an array
|
|
115
|
+
too. With `a` holding `[{"b":"x"},
|
|
116
|
+
{"b":"y"}]`, `a ~> $map(function($v){$v.b})[1]` is now `["x","y"]` (it was `"y"`), `"z" ~>
|
|
117
|
+
$append([1])[0]` is `["z",1]` (it was `"z"`), and `x#$i ~> $count(){"k": $count($)}` is 0 (it
|
|
118
|
+
was T0410). This changes the result of expressions that relied on the filter; to filter the
|
|
119
|
+
result, wrap the chain in parentheses: `(a ~> $map(...))[1]`.
|
|
120
|
+
|
|
121
|
+
- **A `**` step on a missing value runs its filters on nothing, as jsonata-js does**
|
|
122
|
+
([#290](https://github.com/txjmb/jsonata-core/issues/290)). `nope[**[$error("E")]]` is D3137
|
|
123
|
+
and `nope[x[**[1+"a"]]]` is T2002, where both were undefined. A `*` there still runs none.
|
|
124
|
+
A `*` that starts a path runs none on nothing either when more steps follow
|
|
125
|
+
(`*[$error("E")].x` on a string is undefined, where it was D3137).
|
|
126
|
+
|
|
127
|
+
- **A group-by on a step that isn't a path applies where jsonata-js applies it** (stage 3 of
|
|
128
|
+
[#219](https://github.com/txjmb/jsonata-core/issues/219)). On a block, `*` or other node, the
|
|
129
|
+
group now runs inside the step, after the node's predicates and before the step binds its
|
|
130
|
+
focus, index or ancestor: `(objs)@$v{"k": $v.p}.$v` binds `$v` to the grouped object. `#`
|
|
131
|
+
turns the node's predicates into stages applied after the group, so `(objs)[false]{"k": 1}#$j`
|
|
132
|
+
is undefined while `(objs)[false]{"k": 1}` is `{"k": 1}`. A `%` slot left on a step that another
|
|
133
|
+
step follows, or put on a path's last step by a predicate, is never resolved and evaluates to
|
|
134
|
+
nothing, as in jsonata-js, rather than failing with S0217 or resolving against an earlier step
|
|
135
|
+
(`(objs)[%.%.x].p`, `a#$i[%.%.x]`, `a.b{"k": 1}[%.%.a]`). This removes the remaining pinned
|
|
136
|
+
path-semantics divergences. A block whose tail binds nothing (`(%)`, `(*)`, `(%.%)`) gives the
|
|
137
|
+
group plain values, and `#` after predicates on a non-path node still groups as a tuple stream
|
|
138
|
+
(`%[%.x]#$i{"k": 1}` is `{}`).
|
|
139
|
+
|
|
140
|
+
- **Paths are built the way jsonata-js builds them** (stage 2 of
|
|
141
|
+
[#219](https://github.com/txjmb/jsonata-core/issues/219)). The parser uses jsonata-js's binding
|
|
142
|
+
powers for the path operators (`.` 75; `[`, `(`, `@`, `#` 80; group-by `{` 70; sort `^` 40) and
|
|
143
|
+
leaves them as raw nodes, which `ast_transform` resolves in jsonata-js's `processAST` order.
|
|
144
|
+
`-a{...}` and `a = b^(x)` now group as in jsonata-js. Calling something that isn't a function
|
|
145
|
+
(`1()`, `"f"@$v()`, `[1]()`) is T1006 (T1008 for `1(?)`) when the call runs, after its
|
|
146
|
+
arguments, as in jsonata-js (`1($error("x"))` is D3137), not a parse error, so a call of a filtered, sorted or grouped step now evaluates and calling a
|
|
147
|
+
transform (`|x|{"z":1}|($)`) works. Where an expression has more than one path error (S0209,
|
|
148
|
+
S0210, S0213, S0215, S0216, S0217), the one reported is the one jsonata-js raises first, with
|
|
149
|
+
a call's arguments before its procedure: `1.b.2()` and `a[0]@$v(1.b)` are S0213. A second `#`
|
|
150
|
+
on a step without other stages replaces its index (`a#$i#$j`). A `%` predicate (`x[%]`, `x[%[0]]`)
|
|
151
|
+
and a `%` under `#` or `^` (`%#$i`, `%^(x)`) are left unresolved, giving undefined as in
|
|
152
|
+
jsonata-js rather than S0217 or the input. `x ~> $f()#$i` is T2006. S0209, S0210 and S0213
|
|
153
|
+
keep their "Parse error" prefix. Known differences: `#` after `[]` adds an index rather than
|
|
154
|
+
replacing one (`x[]#$i#$j` keeps `$i`); a `[]` after `#` keeps a singleton array that
|
|
155
|
+
jsonata-js unwraps (`acct.o[0]#$i[].id`); and the members of an array or object constructor
|
|
156
|
+
run in order, so the first member's error is reported, where jsonata-js runs them
|
|
157
|
+
concurrently.
|
|
158
|
+
- **Filters on a missing step run as jsonata-js runs them**
|
|
159
|
+
([#260](https://github.com/txjmb/jsonata-core/issues/260)). jsonata-js evaluates the filters
|
|
160
|
+
of a step that gives nothing against `[undefined]`. A computed index of 0 now keeps that
|
|
161
|
+
undefined item, so the next filter runs: `nope[$count([])][$error('E')]` is D3137 and
|
|
162
|
+
`arr.nope[$count([])][$string(1,2,3)]` is T0410 (both were undefined). A predicate that makes
|
|
163
|
+
no call now runs there too when an operator in it can fail its type check without the context:
|
|
164
|
+
`nope[1+'a']` is T2002, `nope[-'a']` D1002, `nope['a'<1]` T2009, `nope[true<1]` T2010,
|
|
165
|
+
`nope[[1..'a']]` T2004, `nope[$$.s+1]` T2001, `nope[{1:2}]` T1003 and
|
|
166
|
+
`nope[{"a":1,"a":2}]` D1009 (all were undefined). The filters of a path in the predicate run
|
|
167
|
+
on nothing too, as before: `nope[x[$error("E")]]` is D3137. Predicates whose operands are all
|
|
168
|
+
paths from the context, such as `nope[price > 5]`, are still skipped. A compiled path step does the same:
|
|
169
|
+
it runs such a filter once on a missing field, so both engines agree. Such a step leaves the
|
|
170
|
+
VM's single-step shortcut for the general compiled path, with no measurable cost
|
|
171
|
+
(`items[$contains(sku,'A')]` over 300,000 items times the same as before).
|
|
172
|
+
- **`$eval` reports an error its expression raises as D3121**, with the inner message (quoted,
|
|
173
|
+
without its code), as jsonata-js does: `$eval('1+"a"')` was T2002. Only unknown functions were wrapped before. The
|
|
174
|
+
engine's own guardrails (timeout D1012, cancellation U1003, depth D1011 and U1001, sequence
|
|
175
|
+
length D2015) keep their codes.
|
|
176
|
+
- **A function passed as an argument of a call runs with a null input**
|
|
177
|
+
([#254](https://github.com/txjmb/jsonata-core/issues/254)). jsonata-js wraps each function
|
|
178
|
+
argument of a call in a closure that applies it with a null input, which a builtin the function
|
|
179
|
+
calls in tail position reads: `($h := function($f){ $f("x") }; $h(function($e){ $eval("a") }))`
|
|
180
|
+
is now undefined (it was 5, the known gap noted under 2.2.12), and
|
|
181
|
+
`($h := function($f){ $f() }; $h($string))` is `"null"`. The wrapper is a partial application
|
|
182
|
+
marked as an argument closure, so the function keeps its arity, and a tail call through one
|
|
183
|
+
still runs in constant stack. A tail call's arguments and the left side of `~>` are not
|
|
184
|
+
wrapped, as in jsonata-js. Inside a path step, `$` in an `$eval` expression is now the eval's
|
|
185
|
+
input rather than the step's item, so this holds there too, and `a.$eval("$", 7)` is 7 for
|
|
186
|
+
each item (it was the item). A partial application of a builtin runs with no input, as
|
|
187
|
+
jsonata-js's does, whether it is called directly or passed as an argument: `($f := $eval(?);
|
|
188
|
+
$f("$"))` and `($h := function($f){ $f("$") }; $h($eval(?)))` are undefined
|
|
189
|
+
([#287](https://github.com/txjmb/jsonata-core/issues/287); they were the input and null). Its
|
|
190
|
+
arguments are checked against the builtin's signature without taking one from the context, so
|
|
191
|
+
`($f := $substring(?, 1); $f(5))` is T0410; jsonata-js doesn't check them at all, and fails
|
|
192
|
+
inside the function (see `docs/compatibility.md`).
|
|
193
|
+
|
|
194
|
+
### Security
|
|
195
|
+
|
|
196
|
+
- `uv.lock`: `dnspython` 2.9.0 → 2.9.2 (CVE-2026-128089) and `opentelemetry-api` 1.45.1 → 1.45.2
|
|
197
|
+
(CVE-2026-126360), clearing the two advisories that failed the scheduled Security Scanning run
|
|
198
|
+
on 2026-11-14. Both are transitive dependencies of the optional `mcp` extra, not of the
|
|
199
|
+
published crate or of the wheel, which has no runtime dependencies. Users of the `mcp` extra
|
|
200
|
+
resolve their own versions and should upgrade both packages.
|
|
201
|
+
|
|
202
|
+
## [2.2.14] - 2026-11-04
|
|
203
|
+
|
|
204
|
+
### Added
|
|
205
|
+
|
|
206
|
+
### Changed
|
|
207
|
+
|
|
208
|
+
- **Compiled regexes are reused.** The same regex literal evaluated again, such as once per element
|
|
209
|
+
under `$map`, no longer compiles again; each thread keeps up to 256.
|
|
210
|
+
- Updated Rust dependencies: `simd-json` 0.18.1 → 0.19.0, used by the default `simd` feature. (#274)
|
|
211
|
+
- **The `mcp` extra now needs Python 3.11 or later.** On Python 3.10, `pip install
|
|
212
|
+
'jsonatapy[mcp]'` installs no `fastmcp`, and `jsonatapy mcp` says the extra needs 3.11. Its
|
|
213
|
+
`dnspython` dependency (through `email-validator`) has no release for 3.10 with the fix for
|
|
214
|
+
GHSA-45c3-73f7-pv4m. The rest of `jsonatapy` still supports 3.10.
|
|
215
|
+
|
|
216
|
+
### Deprecated
|
|
217
|
+
|
|
218
|
+
### Removed
|
|
219
|
+
|
|
220
|
+
### Fixed
|
|
221
|
+
|
|
222
|
+
- **Object keys are in JavaScript's order**: integer-like keys first in ascending order, then the
|
|
223
|
+
rest in insertion order, so `$keys({"b":1,"2":2})` is `["2","b"]` as in jsonata-js. Python
|
|
224
|
+
callers see it too: a dict an expression builds comes back in that order, while a dict passed
|
|
225
|
+
through untouched is the caller's own object and keeps its order. (#273) Thanks to
|
|
226
|
+
@Sawmonabo for finding this and for the fix.
|
|
227
|
+
- **A cancel or a timeout now stops `$distinct` and `$keys` part way.** Both compare each element
|
|
228
|
+
with every one kept so far, and over a large input that ran to the end before U1003 or D1012 was
|
|
229
|
+
seen. (#272) Thanks to @Sawmonabo for the cancel check; the timeout check followed from it.
|
|
230
|
+
- **`\d`, `\w`, `\s` and `\b` in a regex now mean what they mean in jsonata-js**: ASCII digits and
|
|
231
|
+
word characters and ECMAScript's whitespace, so `$contains("٣", /\d/)` is `false`. (#271)
|
|
232
|
+
Thanks to @Sawmonabo for finding and fixing this.
|
|
233
|
+
- **A regex with the `i` flag folds case as jsonata-js does**, by upper case rather than Unicode
|
|
234
|
+
case folding. The Kelvin sign (U+212A) and the long s (U+017F) match only themselves, so
|
|
235
|
+
`$contains("\u212A", /k/i)` and `/[\w]/i` against it are `false`; `ß` and `ẞ` no longer match,
|
|
236
|
+
nor the Ohm and Angstrom signs with `ω` and `å`; and characters outside the BMP no longer fold.
|
|
237
|
+
|
|
238
|
+
### Security
|
|
239
|
+
|
|
240
|
+
- `uv.lock`: `authlib` 1.7.2 → 1.9.1 (seven advisories), `joserfc` 1.7.3 → 1.7.7
|
|
241
|
+
(GHSA-jpxq-7h8p-2q76, GHSA-9pg5-8c7x-5hfx), and `dnspython` 2.8.0 → 2.9.0
|
|
242
|
+
(GHSA-45c3-73f7-pv4m), which no longer resolves for Python 3.10 now that the `mcp` extra needs
|
|
243
|
+
3.11 (see Changed). All three are transitive dependencies of the optional `mcp` extra, not
|
|
244
|
+
of the published crate or of the wheel, which has no runtime dependencies. Users of the `mcp`
|
|
245
|
+
extra resolve their own versions and should upgrade these. (#269, #270)
|
|
246
|
+
|
|
22
247
|
## [2.2.13] - 2026-10-24
|
|
23
248
|
|
|
24
249
|
**Upgrade notes**
|
|
@@ -26,15 +26,6 @@ version = "0.2.21"
|
|
|
26
26
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
27
|
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
|
28
28
|
|
|
29
|
-
[[package]]
|
|
30
|
-
name = "android_system_properties"
|
|
31
|
-
version = "0.1.5"
|
|
32
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
-
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
|
34
|
-
dependencies = [
|
|
35
|
-
"libc",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
29
|
[[package]]
|
|
39
30
|
name = "anes"
|
|
40
31
|
version = "0.1.6"
|
|
@@ -238,19 +229,6 @@ dependencies = [
|
|
|
238
229
|
"rand_core",
|
|
239
230
|
]
|
|
240
231
|
|
|
241
|
-
[[package]]
|
|
242
|
-
name = "chrono"
|
|
243
|
-
version = "0.4.45"
|
|
244
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
245
|
-
checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
|
|
246
|
-
dependencies = [
|
|
247
|
-
"iana-time-zone",
|
|
248
|
-
"js-sys",
|
|
249
|
-
"num-traits",
|
|
250
|
-
"wasm-bindgen",
|
|
251
|
-
"windows-link",
|
|
252
|
-
]
|
|
253
|
-
|
|
254
232
|
[[package]]
|
|
255
233
|
name = "ciborium"
|
|
256
234
|
version = "0.2.2"
|
|
@@ -324,12 +302,6 @@ version = "1.0.5"
|
|
|
324
302
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
325
303
|
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
326
304
|
|
|
327
|
-
[[package]]
|
|
328
|
-
name = "core-foundation-sys"
|
|
329
|
-
version = "0.8.7"
|
|
330
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
331
|
-
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
332
|
-
|
|
333
305
|
[[package]]
|
|
334
306
|
name = "core_detect"
|
|
335
307
|
version = "1.0.0"
|
|
@@ -552,30 +524,6 @@ version = "0.5.0"
|
|
|
552
524
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
553
525
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
554
526
|
|
|
555
|
-
[[package]]
|
|
556
|
-
name = "iana-time-zone"
|
|
557
|
-
version = "0.1.65"
|
|
558
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
559
|
-
checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
|
|
560
|
-
dependencies = [
|
|
561
|
-
"android_system_properties",
|
|
562
|
-
"core-foundation-sys",
|
|
563
|
-
"iana-time-zone-haiku",
|
|
564
|
-
"js-sys",
|
|
565
|
-
"log",
|
|
566
|
-
"wasm-bindgen",
|
|
567
|
-
"windows-core",
|
|
568
|
-
]
|
|
569
|
-
|
|
570
|
-
[[package]]
|
|
571
|
-
name = "iana-time-zone-haiku"
|
|
572
|
-
version = "0.1.2"
|
|
573
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
574
|
-
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
|
575
|
-
dependencies = [
|
|
576
|
-
"cc",
|
|
577
|
-
]
|
|
578
|
-
|
|
579
527
|
[[package]]
|
|
580
528
|
name = "indexmap"
|
|
581
529
|
version = "2.14.2"
|
|
@@ -620,11 +568,10 @@ dependencies = [
|
|
|
620
568
|
|
|
621
569
|
[[package]]
|
|
622
570
|
name = "jsonata-core"
|
|
623
|
-
version = "2.2.
|
|
571
|
+
version = "2.2.15"
|
|
624
572
|
dependencies = [
|
|
625
573
|
"assert_cmd",
|
|
626
574
|
"base64",
|
|
627
|
-
"chrono",
|
|
628
575
|
"clap",
|
|
629
576
|
"criterion",
|
|
630
577
|
"indexmap",
|
|
@@ -637,6 +584,7 @@ dependencies = [
|
|
|
637
584
|
"pyo3",
|
|
638
585
|
"rand",
|
|
639
586
|
"regex",
|
|
587
|
+
"regex-syntax",
|
|
640
588
|
"serde",
|
|
641
589
|
"serde_json",
|
|
642
590
|
"simd-json",
|
|
@@ -665,12 +613,6 @@ version = "0.12.1"
|
|
|
665
613
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
666
614
|
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
667
615
|
|
|
668
|
-
[[package]]
|
|
669
|
-
name = "log"
|
|
670
|
-
version = "0.4.33"
|
|
671
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
672
|
-
checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
|
|
673
|
-
|
|
674
616
|
[[package]]
|
|
675
617
|
name = "memchr"
|
|
676
618
|
version = "2.8.3"
|
|
@@ -986,26 +928,6 @@ dependencies = [
|
|
|
986
928
|
"crossbeam-utils",
|
|
987
929
|
]
|
|
988
930
|
|
|
989
|
-
[[package]]
|
|
990
|
-
name = "ref-cast"
|
|
991
|
-
version = "1.0.25"
|
|
992
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
993
|
-
checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
|
|
994
|
-
dependencies = [
|
|
995
|
-
"ref-cast-impl",
|
|
996
|
-
]
|
|
997
|
-
|
|
998
|
-
[[package]]
|
|
999
|
-
name = "ref-cast-impl"
|
|
1000
|
-
version = "1.0.25"
|
|
1001
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1002
|
-
checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
|
|
1003
|
-
dependencies = [
|
|
1004
|
-
"proc-macro2",
|
|
1005
|
-
"quote",
|
|
1006
|
-
"syn 2.0.118",
|
|
1007
|
-
]
|
|
1008
|
-
|
|
1009
931
|
[[package]]
|
|
1010
932
|
name = "regex"
|
|
1011
933
|
version = "1.13.1"
|
|
@@ -1134,12 +1056,11 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
|
1134
1056
|
|
|
1135
1057
|
[[package]]
|
|
1136
1058
|
name = "simd-json"
|
|
1137
|
-
version = "0.
|
|
1059
|
+
version = "0.19.0"
|
|
1138
1060
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1139
|
-
checksum = "
|
|
1061
|
+
checksum = "e8f2e4d523646f7da6dde3983bd18ede0babc21c258ab708b3dd93ea0259719d"
|
|
1140
1062
|
dependencies = [
|
|
1141
1063
|
"halfbrown",
|
|
1142
|
-
"ref-cast",
|
|
1143
1064
|
"serde",
|
|
1144
1065
|
"serde_json",
|
|
1145
1066
|
"simdutf8",
|
|
@@ -1304,9 +1225,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
|
1304
1225
|
|
|
1305
1226
|
[[package]]
|
|
1306
1227
|
name = "value-trait"
|
|
1307
|
-
version = "0.12.
|
|
1228
|
+
version = "0.12.3"
|
|
1308
1229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1309
|
-
checksum = "
|
|
1230
|
+
checksum = "545a3d7089f11f1741d12963c057adf9443fc24325110a6a6daf582e825fd51b"
|
|
1310
1231
|
dependencies = [
|
|
1311
1232
|
"float-cmp",
|
|
1312
1233
|
"halfbrown",
|
|
@@ -1419,65 +1340,12 @@ version = "0.4.0"
|
|
|
1419
1340
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1420
1341
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
1421
1342
|
|
|
1422
|
-
[[package]]
|
|
1423
|
-
name = "windows-core"
|
|
1424
|
-
version = "0.62.2"
|
|
1425
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1426
|
-
checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
|
|
1427
|
-
dependencies = [
|
|
1428
|
-
"windows-implement",
|
|
1429
|
-
"windows-interface",
|
|
1430
|
-
"windows-link",
|
|
1431
|
-
"windows-result",
|
|
1432
|
-
"windows-strings",
|
|
1433
|
-
]
|
|
1434
|
-
|
|
1435
|
-
[[package]]
|
|
1436
|
-
name = "windows-implement"
|
|
1437
|
-
version = "0.60.2"
|
|
1438
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1439
|
-
checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
|
|
1440
|
-
dependencies = [
|
|
1441
|
-
"proc-macro2",
|
|
1442
|
-
"quote",
|
|
1443
|
-
"syn 2.0.118",
|
|
1444
|
-
]
|
|
1445
|
-
|
|
1446
|
-
[[package]]
|
|
1447
|
-
name = "windows-interface"
|
|
1448
|
-
version = "0.59.3"
|
|
1449
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1450
|
-
checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
|
|
1451
|
-
dependencies = [
|
|
1452
|
-
"proc-macro2",
|
|
1453
|
-
"quote",
|
|
1454
|
-
"syn 2.0.118",
|
|
1455
|
-
]
|
|
1456
|
-
|
|
1457
1343
|
[[package]]
|
|
1458
1344
|
name = "windows-link"
|
|
1459
1345
|
version = "0.2.1"
|
|
1460
1346
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1461
1347
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
1462
1348
|
|
|
1463
|
-
[[package]]
|
|
1464
|
-
name = "windows-result"
|
|
1465
|
-
version = "0.4.1"
|
|
1466
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1467
|
-
checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
|
|
1468
|
-
dependencies = [
|
|
1469
|
-
"windows-link",
|
|
1470
|
-
]
|
|
1471
|
-
|
|
1472
|
-
[[package]]
|
|
1473
|
-
name = "windows-strings"
|
|
1474
|
-
version = "0.5.1"
|
|
1475
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1476
|
-
checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
|
|
1477
|
-
dependencies = [
|
|
1478
|
-
"windows-link",
|
|
1479
|
-
]
|
|
1480
|
-
|
|
1481
1349
|
[[package]]
|
|
1482
1350
|
name = "windows-sys"
|
|
1483
1351
|
version = "0.61.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "jsonata-core"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.15"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["txjmb <txjmb@users.noreply.github.com>"]
|
|
6
6
|
description = "High-performance Rust implementation of JSONata query and transformation language"
|
|
@@ -46,14 +46,14 @@ serde = { version = "1.0", features = ["derive"] }
|
|
|
46
46
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
|
47
47
|
thiserror = "2.0"
|
|
48
48
|
regex = "1.12"
|
|
49
|
-
|
|
49
|
+
regex-syntax = "0.8"
|
|
50
50
|
num-traits = "0.2"
|
|
51
51
|
base64 = "0.23"
|
|
52
|
-
indexmap = "2.2"
|
|
52
|
+
indexmap = "2.2.3"
|
|
53
53
|
percent-encoding = "2.3"
|
|
54
54
|
rand = "0.10"
|
|
55
55
|
stacker = "0.1"
|
|
56
|
-
simd-json = { version = "0.
|
|
56
|
+
simd-json = { version = "0.19", optional = true }
|
|
57
57
|
clap = { version = "4.6", features = ["derive"], optional = true }
|
|
58
58
|
mimalloc = { version = "0.1.52", optional = true }
|
|
59
59
|
libmimalloc-sys = { version = "0.1.49", optional = true }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jsonatapy
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.15
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -24,12 +24,12 @@ Requires-Dist: pytest-asyncio>=0.24 ; extra == 'dev'
|
|
|
24
24
|
Requires-Dist: ruff>=0.3.0 ; extra == 'dev'
|
|
25
25
|
Requires-Dist: mypy>=1.0 ; extra == 'dev'
|
|
26
26
|
Requires-Dist: maturin>=1.0 ; extra == 'dev'
|
|
27
|
-
Requires-Dist: fastmcp>=4.1.2 ; extra == 'dev'
|
|
27
|
+
Requires-Dist: fastmcp>=4.1.2 ; python_full_version >= '3.11' and extra == 'dev'
|
|
28
28
|
Requires-Dist: mkdocs>=1.5 ; extra == 'docs'
|
|
29
29
|
Requires-Dist: mkdocs-material>=9.0 ; extra == 'docs'
|
|
30
30
|
Requires-Dist: mkdocstrings[python]>=0.24 ; extra == 'docs'
|
|
31
31
|
Requires-Dist: pymdown-extensions>=10.0 ; extra == 'docs'
|
|
32
|
-
Requires-Dist: fastmcp>=4.1.2 ; extra == 'mcp'
|
|
32
|
+
Requires-Dist: fastmcp>=4.1.2 ; python_full_version >= '3.11' and extra == 'mcp'
|
|
33
33
|
Provides-Extra: bench
|
|
34
34
|
Provides-Extra: dev
|
|
35
35
|
Provides-Extra: docs
|
|
@@ -75,7 +75,7 @@ Project-URL: Repository, https://github.com/txjmb/jsonata-core
|
|
|
75
75
|
<source media="(prefers-color-scheme: dark)"
|
|
76
76
|
srcset="https://raw.githubusercontent.com/txjmb/jsonata-core/main/docs/assets/realistic-workload-dark.svg">
|
|
77
77
|
<img width="880"
|
|
78
|
-
alt="Realistic-workload benchmark on a 100-product dataset, lower is better: jsonatapy is 8.
|
|
78
|
+
alt="Realistic-workload benchmark on a 100-product dataset, lower is better: jsonatapy is 8.0x faster than the jsonata-js reference on the geometric mean of 5 e-commerce queries, and the pure-Rust jsonata-core engine is faster still."
|
|
79
79
|
src="https://raw.githubusercontent.com/txjmb/jsonata-core/main/docs/assets/realistic-workload-light.svg">
|
|
80
80
|
</picture>
|
|
81
81
|
</a>
|
|
@@ -156,10 +156,10 @@ let result = Evaluator::new().evaluate(&ast, &data)?;
|
|
|
156
156
|
```toml
|
|
157
157
|
# Cargo.toml
|
|
158
158
|
[dependencies]
|
|
159
|
-
jsonata-core = "2.2.
|
|
159
|
+
jsonata-core = "2.2.15" # pure Rust, no Python dependency
|
|
160
160
|
|
|
161
161
|
# Optional: disable SIMD for constrained targets
|
|
162
|
-
jsonata-core = { version = "2.2.
|
|
162
|
+
jsonata-core = { version = "2.2.15", default-features = false }
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
---
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<source media="(prefers-color-scheme: dark)"
|
|
27
27
|
srcset="https://raw.githubusercontent.com/txjmb/jsonata-core/main/docs/assets/realistic-workload-dark.svg">
|
|
28
28
|
<img width="880"
|
|
29
|
-
alt="Realistic-workload benchmark on a 100-product dataset, lower is better: jsonatapy is 8.
|
|
29
|
+
alt="Realistic-workload benchmark on a 100-product dataset, lower is better: jsonatapy is 8.0x faster than the jsonata-js reference on the geometric mean of 5 e-commerce queries, and the pure-Rust jsonata-core engine is faster still."
|
|
30
30
|
src="https://raw.githubusercontent.com/txjmb/jsonata-core/main/docs/assets/realistic-workload-light.svg">
|
|
31
31
|
</picture>
|
|
32
32
|
</a>
|
|
@@ -107,10 +107,10 @@ let result = Evaluator::new().evaluate(&ast, &data)?;
|
|
|
107
107
|
```toml
|
|
108
108
|
# Cargo.toml
|
|
109
109
|
[dependencies]
|
|
110
|
-
jsonata-core = "2.2.
|
|
110
|
+
jsonata-core = "2.2.15" # pure Rust, no Python dependency
|
|
111
111
|
|
|
112
112
|
# Optional: disable SIMD for constrained targets
|
|
113
|
-
jsonata-core = { version = "2.2.
|
|
113
|
+
jsonata-core = { version = "2.2.15", default-features = false }
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
---
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "jsonatapy"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.15"
|
|
8
8
|
description = "High-performance Python/Rust implementation of JSONata query and transformation language"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "txjmb", email = "txjmb@users.noreply.github.com"}
|
|
@@ -42,10 +42,12 @@ dev = [
|
|
|
42
42
|
"ruff>=0.3.0", # Linting and formatting
|
|
43
43
|
"mypy>=1.0",
|
|
44
44
|
"maturin>=1.0",
|
|
45
|
-
"fastmcp>=4.1.2",
|
|
45
|
+
"fastmcp>=4.1.2; python_version >= '3.11'", # So `dev` installs can run the full test suite
|
|
46
46
|
]
|
|
47
47
|
mcp = [
|
|
48
|
-
|
|
48
|
+
# 3.11+ only: fastmcp pulls in dnspython through email-validator, and dnspython 2.9.0,
|
|
49
|
+
# the first release with the fix for GHSA-45c3-73f7-pv4m, dropped 3.10.
|
|
50
|
+
"fastmcp>=4.1.2; python_version >= '3.11'",
|
|
49
51
|
]
|
|
50
52
|
bench = [
|
|
51
53
|
"jsonata>=0.2.0", # jsonata-python for benchmarking
|
|
@@ -82,7 +84,7 @@ dev = [
|
|
|
82
84
|
"ruff>=0.3.0",
|
|
83
85
|
"mypy>=1.0",
|
|
84
86
|
"maturin>=1.0",
|
|
85
|
-
"fastmcp>=4.1.2",
|
|
87
|
+
"fastmcp>=4.1.2; python_version >= '3.11'",
|
|
86
88
|
]
|
|
87
89
|
|
|
88
90
|
[tool.ruff]
|
|
@@ -24,7 +24,7 @@ def _run_mcp(argv: list[str]) -> int:
|
|
|
24
24
|
from ._cli.mcp_server import serve
|
|
25
25
|
except ImportError:
|
|
26
26
|
print(
|
|
27
|
-
"error: the 'mcp' extra is not installed. Run:\n"
|
|
27
|
+
"error: the 'mcp' extra is not installed (it needs Python 3.11 or later). Run:\n"
|
|
28
28
|
' uvx --from "jsonatapy[mcp]" jsonatapy mcp\n'
|
|
29
29
|
"or: pip install jsonatapy[mcp]",
|
|
30
30
|
file=sys.stderr,
|