jsonatapy 2.2.15__tar.gz → 2.2.17__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.15 → jsonatapy-2.2.17}/CHANGELOG.md +69 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/Cargo.lock +25 -27
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/Cargo.toml +18 -1
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/PKG-INFO +4 -4
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/README.md +3 -3
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/pyproject.toml +5 -1
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/allocator.rs +7 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/builtins.rs +24 -5
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/datetime.rs +176 -9
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/evaluator.rs +376 -78
- jsonatapy-2.2.17/vendor/libmimalloc-sys/Cargo.toml +79 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/LICENSE.txt +25 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/VENDORED.md +28 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/build.rs +140 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/LICENSE +21 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/atomic.h +560 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/bits.h +354 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/internal.h +1387 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/prim-tls.h +483 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/prim.h +136 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/track.h +150 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc/types.h +755 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc-new-delete.h +66 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc-override.h +68 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc-stats.h +168 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/include/mimalloc.h +705 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/alloc-aligned.c +462 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/alloc-override.c +407 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/alloc-posix.c +190 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/alloc.c +970 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/arena-meta.c +183 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/arena.c +2616 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/bitmap.c +1971 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/bitmap.h +344 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/free.c +710 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/heap.c +296 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/init.c +1258 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/libc.c +499 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/options.c +696 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/os.c +931 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/page-map.c +478 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/page-queue.c +423 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/page.c +1045 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/emscripten/prim.c +263 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/osx/alloc-override-zone.c +497 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/osx/prim.c +9 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/prim.c +76 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/readme.md +9 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/unix/prim.c +1067 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/wasi/prim.c +297 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/windows/etw-mimalloc.wprp +61 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/windows/etw.h +905 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/windows/etw.man +0 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/windows/prim.c +1202 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/prim/windows/readme.md +17 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/random.c +260 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/static.c +43 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/stats.c +830 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/theap.c +676 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/c_src/mimalloc/v3/src/threadlocal.c +308 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/src/extended.rs +1126 -0
- jsonatapy-2.2.17/vendor/libmimalloc-sys/src/lib.rs +139 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.gitignore +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.gitmodules +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/.gitignore +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/architecture.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/conventions.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/core.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/memory_maintenance.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/suggested_commands.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/task_completion.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/.serena/memories/tech_stack.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/CONTRIBUTORS.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/LICENSE +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/SECURITY.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/benches/evaluator_bench.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/bindings/c/README.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/bindings/c/examples/smoke.c +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/bindings/c/jsonata.h +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/examples/evaluator_demo.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/examples/host_functions.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/examples/parser_demo.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/examples/simd_json_bench.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/__init__.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/__main__.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/_cli/__init__.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/_cli/bindings.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/_cli/error_format.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/_cli/mcp_server.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/_cli/resolve.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/_cli/run.py +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/python/jsonatapy/py.typed +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/ast.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/ast_transform.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/bin/jsonata/bindings.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/bin/jsonata/error_format.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/bin/jsonata/main.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/bin/jsonata/resolve.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/capi.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/compiler.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/expression.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/functions.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/lazy.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/lib.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/parser.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/pystack.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/signature.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/value.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/src/vm.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/study/cli_fixtures.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/study/cli_fixtures_testdata.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/study/cli_spec.md +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/array_flags_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/cli_fixtures_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/cli_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/common/mod.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/datetime_picture_suite.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/deep_value_drop_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/evaluator_reuse_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/array_flags_differential.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/builtin_arity.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/builtin_differential.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/builtin_signatures.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/fastpath_differential.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/fastpath_known_divergences.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/path_semantics_combinations.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/path_semantics_combinations_known.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/fixtures/path_semantics_differential.json +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/host_functions_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/integration_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/lambda_closure_suite.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/parent_and_focus_binding_suite.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/path_semantics_test.rs +0 -0
- {jsonatapy-2.2.15 → jsonatapy-2.2.17}/tests/step_cache_test.rs +0 -0
|
@@ -19,6 +19,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
19
|
|
|
20
20
|
### Security
|
|
21
21
|
|
|
22
|
+
## [2.2.17] - 2026-11-28
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
### Deprecated
|
|
29
|
+
|
|
30
|
+
### Removed
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- The transform operator (`~> | location | update |`) now changes only the
|
|
35
|
+
objects its location matches, by identity, as jsonata-js does. It used to
|
|
36
|
+
match by value, so `{"b":{"a":1},"c":{"a":1}} ~> | b | {"x":2} |` changed
|
|
37
|
+
`c` too. Matches now also apply in order, each to the object as earlier
|
|
38
|
+
matches left it, and the delete clause sees the object after its update.
|
|
39
|
+
A location that matches an object outside the input's copy (one it built,
|
|
40
|
+
such as `{}` or `$merge([a])`) raises D1014, as in jsonata-js 2.3.0.
|
|
41
|
+
- Inputs that panicked or exhausted memory now give a result or a coded
|
|
42
|
+
error, following the limits jsonata-js 2.3.0 added for them:
|
|
43
|
+
- `$pad` raises D2016 when the padding would exceed 1e7 characters
|
|
44
|
+
(jsonata-js #832). A huge width no longer saturates to 2^31 and
|
|
45
|
+
allocates gigabytes.
|
|
46
|
+
- `$formatInteger` (and date/time pictures) format numbers above 1e7 as
|
|
47
|
+
decimal digits instead of roman numerals, so `$formatInteger(-1e15, 'i')`
|
|
48
|
+
no longer tries to build 1e12 `M`s.
|
|
49
|
+
- A date/time width modifier above 100 raises D3142, so `[Y,600000000]`
|
|
50
|
+
no longer divides by zero and `[f,150000000]` no longer builds a
|
|
51
|
+
150-million-character string. `[Y,100]` no longer panics on `10^100`.
|
|
52
|
+
- `$parseInteger('12', '١')` (ASCII digits with a picture in another digit
|
|
53
|
+
family) no longer panics, and `$fromMillis(0, '[fN]')` raises D3133
|
|
54
|
+
instead of panicking.
|
|
55
|
+
- `$toMillis` returns undefined, without building the regex, when the
|
|
56
|
+
timestamp is shorter than the picture needs or matching it would be too
|
|
57
|
+
large, so a picture with 100,000 markers or a 10-million-character
|
|
58
|
+
literal no longer exhausts memory.
|
|
59
|
+
|
|
60
|
+
### Security
|
|
61
|
+
|
|
62
|
+
## [2.2.16] - 2026-11-27
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
|
|
66
|
+
### Changed
|
|
67
|
+
|
|
68
|
+
- Updated Rust dependencies: `regex` 1.13.1 → 1.13.2, `regex-syntax` 0.8.11 → 0.8.12,
|
|
69
|
+
`rand` 0.10.3 → 0.10.4 and `clap` 4.6.7 → 4.6.9. (#297)
|
|
70
|
+
|
|
71
|
+
### Deprecated
|
|
72
|
+
|
|
73
|
+
### Removed
|
|
74
|
+
|
|
75
|
+
### Fixed
|
|
76
|
+
|
|
77
|
+
- Python wheels now build mimalloc v3.4.5 (vendored `libmimalloc-sys` with
|
|
78
|
+
updated sources) instead of v3.3.2, fixing two allocator crashes (#298). On
|
|
79
|
+
macOS, v3.3.2 kept its thread heap in fixed thread-specific-data slots that
|
|
80
|
+
every mimalloc v3 copy in the process shares, so importing jsonatapy before
|
|
81
|
+
pyarrow 24.0.0 (or chdb) made the first `compile()` segfault or hang. On
|
|
82
|
+
every platform, a crash followed once the first thread that used jsonatapy
|
|
83
|
+
had exited (microsoft/mimalloc#1287). Only the PyPI wheels and sdist get the
|
|
84
|
+
vendored copy: Rust users who enable the optional `mimalloc` feature from
|
|
85
|
+
crates.io still build v3.3.2 until `libmimalloc-sys` ships mimalloc >= 3.4.5.
|
|
86
|
+
Thanks to @dotsonwells-vynca for the report, whose clean reproduction and
|
|
87
|
+
import-order and version matrix made the cause quick to find.
|
|
88
|
+
|
|
89
|
+
### Security
|
|
90
|
+
|
|
22
91
|
## [2.2.15] - 2026-11-18
|
|
23
92
|
|
|
24
93
|
### Added
|
|
@@ -164,7 +164,7 @@ dependencies = [
|
|
|
164
164
|
"proc-macro-crate",
|
|
165
165
|
"proc-macro2",
|
|
166
166
|
"quote",
|
|
167
|
-
"syn 3.0.
|
|
167
|
+
"syn 3.0.10",
|
|
168
168
|
]
|
|
169
169
|
|
|
170
170
|
[[package]]
|
|
@@ -258,9 +258,9 @@ dependencies = [
|
|
|
258
258
|
|
|
259
259
|
[[package]]
|
|
260
260
|
name = "clap"
|
|
261
|
-
version = "4.6.
|
|
261
|
+
version = "4.6.9"
|
|
262
262
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
263
|
-
checksum = "
|
|
263
|
+
checksum = "844c5c0b65be192cb68d570cca1b21a6444431d24e39c084dc0336177015337c"
|
|
264
264
|
dependencies = [
|
|
265
265
|
"clap_builder",
|
|
266
266
|
"clap_derive",
|
|
@@ -280,14 +280,14 @@ dependencies = [
|
|
|
280
280
|
|
|
281
281
|
[[package]]
|
|
282
282
|
name = "clap_derive"
|
|
283
|
-
version = "4.6.
|
|
283
|
+
version = "4.6.9"
|
|
284
284
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
285
|
-
checksum = "
|
|
285
|
+
checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7"
|
|
286
286
|
dependencies = [
|
|
287
287
|
"heck",
|
|
288
288
|
"proc-macro2",
|
|
289
289
|
"quote",
|
|
290
|
-
"syn 3.0.
|
|
290
|
+
"syn 3.0.10",
|
|
291
291
|
]
|
|
292
292
|
|
|
293
293
|
[[package]]
|
|
@@ -568,7 +568,7 @@ dependencies = [
|
|
|
568
568
|
|
|
569
569
|
[[package]]
|
|
570
570
|
name = "jsonata-core"
|
|
571
|
-
version = "2.2.
|
|
571
|
+
version = "2.2.17"
|
|
572
572
|
dependencies = [
|
|
573
573
|
"assert_cmd",
|
|
574
574
|
"base64",
|
|
@@ -601,8 +601,6 @@ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
|
601
601
|
[[package]]
|
|
602
602
|
name = "libmimalloc-sys"
|
|
603
603
|
version = "0.1.49"
|
|
604
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
605
|
-
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
|
606
604
|
dependencies = [
|
|
607
605
|
"cc",
|
|
608
606
|
]
|
|
@@ -767,9 +765,9 @@ dependencies = [
|
|
|
767
765
|
|
|
768
766
|
[[package]]
|
|
769
767
|
name = "proc-macro2"
|
|
770
|
-
version = "1.0.
|
|
768
|
+
version = "1.0.107"
|
|
771
769
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
772
|
-
checksum = "
|
|
770
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
773
771
|
dependencies = [
|
|
774
772
|
"unicode-ident",
|
|
775
773
|
]
|
|
@@ -846,7 +844,7 @@ dependencies = [
|
|
|
846
844
|
"proc-macro2",
|
|
847
845
|
"pyo3-macros-backend",
|
|
848
846
|
"quote",
|
|
849
|
-
"syn 3.0.
|
|
847
|
+
"syn 3.0.10",
|
|
850
848
|
]
|
|
851
849
|
|
|
852
850
|
[[package]]
|
|
@@ -858,7 +856,7 @@ dependencies = [
|
|
|
858
856
|
"heck",
|
|
859
857
|
"proc-macro2",
|
|
860
858
|
"quote",
|
|
861
|
-
"syn 3.0.
|
|
859
|
+
"syn 3.0.10",
|
|
862
860
|
]
|
|
863
861
|
|
|
864
862
|
[[package]]
|
|
@@ -869,9 +867,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
|
|
869
867
|
|
|
870
868
|
[[package]]
|
|
871
869
|
name = "quote"
|
|
872
|
-
version = "1.0.
|
|
870
|
+
version = "1.0.47"
|
|
873
871
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
874
|
-
checksum = "
|
|
872
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
875
873
|
dependencies = [
|
|
876
874
|
"proc-macro2",
|
|
877
875
|
]
|
|
@@ -884,9 +882,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
|
884
882
|
|
|
885
883
|
[[package]]
|
|
886
884
|
name = "rand"
|
|
887
|
-
version = "0.10.
|
|
885
|
+
version = "0.10.4"
|
|
888
886
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
889
|
-
checksum = "
|
|
887
|
+
checksum = "8f6fa277c67e6ea590466f04c3fe82cb509f0864fe470643e5570de9514a9b11"
|
|
890
888
|
dependencies = [
|
|
891
889
|
"chacha20",
|
|
892
890
|
"getrandom",
|
|
@@ -930,9 +928,9 @@ dependencies = [
|
|
|
930
928
|
|
|
931
929
|
[[package]]
|
|
932
930
|
name = "regex"
|
|
933
|
-
version = "1.13.
|
|
931
|
+
version = "1.13.2"
|
|
934
932
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
935
|
-
checksum = "
|
|
933
|
+
checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857"
|
|
936
934
|
dependencies = [
|
|
937
935
|
"aho-corasick",
|
|
938
936
|
"memchr",
|
|
@@ -942,9 +940,9 @@ dependencies = [
|
|
|
942
940
|
|
|
943
941
|
[[package]]
|
|
944
942
|
name = "regex-automata"
|
|
945
|
-
version = "0.4.
|
|
943
|
+
version = "0.4.19"
|
|
946
944
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
947
|
-
checksum = "
|
|
945
|
+
checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158"
|
|
948
946
|
dependencies = [
|
|
949
947
|
"aho-corasick",
|
|
950
948
|
"memchr",
|
|
@@ -953,9 +951,9 @@ dependencies = [
|
|
|
953
951
|
|
|
954
952
|
[[package]]
|
|
955
953
|
name = "regex-syntax"
|
|
956
|
-
version = "0.8.
|
|
954
|
+
version = "0.8.12"
|
|
957
955
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
958
|
-
checksum = "
|
|
956
|
+
checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6"
|
|
959
957
|
|
|
960
958
|
[[package]]
|
|
961
959
|
name = "rustix"
|
|
@@ -1030,7 +1028,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
1030
1028
|
dependencies = [
|
|
1031
1029
|
"proc-macro2",
|
|
1032
1030
|
"quote",
|
|
1033
|
-
"syn 3.0.
|
|
1031
|
+
"syn 3.0.10",
|
|
1034
1032
|
]
|
|
1035
1033
|
|
|
1036
1034
|
[[package]]
|
|
@@ -1111,9 +1109,9 @@ dependencies = [
|
|
|
1111
1109
|
|
|
1112
1110
|
[[package]]
|
|
1113
1111
|
name = "syn"
|
|
1114
|
-
version = "3.0.
|
|
1112
|
+
version = "3.0.10"
|
|
1115
1113
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1116
|
-
checksum = "
|
|
1114
|
+
checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
|
|
1117
1115
|
dependencies = [
|
|
1118
1116
|
"proc-macro2",
|
|
1119
1117
|
"quote",
|
|
@@ -1162,7 +1160,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
|
1162
1160
|
dependencies = [
|
|
1163
1161
|
"proc-macro2",
|
|
1164
1162
|
"quote",
|
|
1165
|
-
"syn 3.0.
|
|
1163
|
+
"syn 3.0.10",
|
|
1166
1164
|
]
|
|
1167
1165
|
|
|
1168
1166
|
[[package]]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "jsonata-core"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.17"
|
|
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"
|
|
@@ -13,6 +13,7 @@ categories = ["parsing", "data-structures"]
|
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
rust-version = "1.70"
|
|
15
15
|
exclude = [
|
|
16
|
+
"vendor/*",
|
|
16
17
|
"tests/jsonata-js/*",
|
|
17
18
|
"tests/python/*",
|
|
18
19
|
"python/*",
|
|
@@ -65,6 +66,10 @@ python = ["dep:pyo3"]
|
|
|
65
66
|
cli = ["dep:clap"]
|
|
66
67
|
bench = [] # exposes _bench facade for Criterion benchmarks
|
|
67
68
|
capi = []
|
|
69
|
+
# Note for crates.io users: the vendored mimalloc 3.4.5 (see [patch.crates-io]
|
|
70
|
+
# below) only applies when building from this repository or the sdist; a
|
|
71
|
+
# crates.io build of this feature gets libmimalloc-sys 0.1.49's mimalloc 3.3.2,
|
|
72
|
+
# which can crash after the first thread that allocated exits (#298).
|
|
68
73
|
mimalloc = ["dep:mimalloc", "dep:libmimalloc-sys"]
|
|
69
74
|
|
|
70
75
|
[dev-dependencies]
|
|
@@ -93,3 +98,15 @@ opt-level = 0
|
|
|
93
98
|
[package.metadata.maturin]
|
|
94
99
|
python-source = "python"
|
|
95
100
|
module-name = "jsonatapy._jsonatapy"
|
|
101
|
+
|
|
102
|
+
# libmimalloc-sys 0.1.49 bundles mimalloc v3.3.2, which crashes next to other
|
|
103
|
+
# mimalloc v3 copies on macOS (fixed TLS slots, e.g. pyarrow 24) and once the
|
|
104
|
+
# first thread that allocated has exited (microsoft/mimalloc#1287). The
|
|
105
|
+
# vendored copy is that crate unchanged except for mimalloc v3.4.5 sources,
|
|
106
|
+
# which fix both (see vendor/libmimalloc-sys/VENDORED.md and GitHub #298).
|
|
107
|
+
# Remove this patch and vendor/ once a libmimalloc-sys release bundles
|
|
108
|
+
# mimalloc >= 3.4.5 (purpleprotocol/mimalloc_rust#169). `[patch]` does not
|
|
109
|
+
# apply to crates.io dependents, who still get v3.3.2 with the `mimalloc`
|
|
110
|
+
# feature.
|
|
111
|
+
[patch.crates-io]
|
|
112
|
+
libmimalloc-sys = { path = "vendor/libmimalloc-sys" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jsonatapy
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.17
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -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
|
|
78
|
+
alt="Realistic-workload benchmark on a 100-product dataset, lower is better: jsonatapy is 7.9x 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.17" # 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.17", 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
|
|
29
|
+
alt="Realistic-workload benchmark on a 100-product dataset, lower is better: jsonatapy is 7.9x 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.17" # 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.17", 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.17"
|
|
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"}
|
|
@@ -74,6 +74,10 @@ Repository = "https://github.com/txjmb/jsonata-core"
|
|
|
74
74
|
python-source = "python"
|
|
75
75
|
module-name = "jsonatapy._jsonatapy"
|
|
76
76
|
features = ["pyo3/extension-module", "python", "mimalloc"]
|
|
77
|
+
# Cargo.toml excludes vendor/ from the crates.io package, which maturin
|
|
78
|
+
# honours too, but the sdist needs the vendored libmimalloc-sys that
|
|
79
|
+
# `[patch.crates-io]` points at (GitHub #298).
|
|
80
|
+
include = [{ path = "vendor/**/*", format = "sdist" }]
|
|
77
81
|
|
|
78
82
|
[dependency-groups]
|
|
79
83
|
dev = [
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
//! [`SmallAlignMiMalloc`] calls `mi_malloc` directly for the alignments it
|
|
14
14
|
//! guarantees, which is nearly every Rust allocation, and hands the rest to
|
|
15
15
|
//! `MiMalloc`.
|
|
16
|
+
//!
|
|
17
|
+
//! The mimalloc C sources come from `vendor/libmimalloc-sys` (mimalloc
|
|
18
|
+
//! v3.4.5, via `[patch.crates-io]` in Cargo.toml) rather than the v3.3.2 that
|
|
19
|
+
//! `libmimalloc-sys` 0.1.49 bundles: v3.3.2 kept its thread heap in fixed
|
|
20
|
+
//! macOS TLS slots shared with other mimalloc copies such as pyarrow 24's, and
|
|
21
|
+
//! crashed once the first thread that allocated had exited. See GitHub #298
|
|
22
|
+
//! and `vendor/libmimalloc-sys/VENDORED.md`.
|
|
16
23
|
|
|
17
24
|
use std::alloc::{GlobalAlloc, Layout};
|
|
18
25
|
|
|
@@ -705,8 +705,12 @@ pub(crate) fn dispatch_pure_with(
|
|
|
705
705
|
// is therefore NaN too. `NaN > 0` is false, so the reference
|
|
706
706
|
// skips padding entirely and returns the string unchanged --
|
|
707
707
|
// whatever pad character was given.
|
|
708
|
+
//
|
|
709
|
+
// The width is kept as an f64 (truncated, as `Math.trunc` does)
|
|
710
|
+
// so a huge width is not silently saturated by an integer cast
|
|
711
|
+
// before the D2016 size check below.
|
|
708
712
|
let width = match &args.get(1) {
|
|
709
|
-
Some(JValue::Number(n)) =>
|
|
713
|
+
Some(JValue::Number(n)) => n.trunc(),
|
|
710
714
|
Some(JValue::Undefined) | None => return Ok(JValue::string(string)),
|
|
711
715
|
_ => {
|
|
712
716
|
return Err(EvaluatorError::TypeError(
|
|
@@ -721,16 +725,31 @@ pub(crate) fn dispatch_pure_with(
|
|
|
721
725
|
_ => Rc::from(" "),
|
|
722
726
|
};
|
|
723
727
|
|
|
724
|
-
let abs_width = width.unsigned_abs() as usize;
|
|
725
728
|
// Count Unicode characters (code points), not bytes
|
|
726
729
|
let char_count = string.chars().count();
|
|
730
|
+
let pad_length = width.abs() - char_count as f64;
|
|
727
731
|
|
|
728
|
-
|
|
732
|
+
// NaN (from a NaN width) compares false here too, matching
|
|
733
|
+
// jsonata-js, which then returns the string unchanged.
|
|
734
|
+
if pad_length.is_nan() || pad_length <= 0.0 {
|
|
729
735
|
// String is already long enough
|
|
730
736
|
return Ok(JValue::string(string));
|
|
731
737
|
}
|
|
732
738
|
|
|
733
|
-
|
|
739
|
+
// jsonata-js 2.3.0 (#832) caps the padding at ten million
|
|
740
|
+
// characters, the same limit as the range operator (D2014).
|
|
741
|
+
if pad_length > 1e7 {
|
|
742
|
+
return Err(EvaluatorError::EvaluationError(format!(
|
|
743
|
+
"D2016: The size of the string requested by the $pad function must not exceed 1e7. Attempted to allocate {}.",
|
|
744
|
+
if pad_length.is_finite() {
|
|
745
|
+
crate::value::js_number_to_string(pad_length)
|
|
746
|
+
} else {
|
|
747
|
+
"Infinity".to_string()
|
|
748
|
+
}
|
|
749
|
+
)));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
let padding_needed = pad_length as usize;
|
|
734
753
|
|
|
735
754
|
let pad_chars: Vec<char> = pad_string.chars().collect();
|
|
736
755
|
let mut padding = String::with_capacity(padding_needed);
|
|
@@ -738,7 +757,7 @@ pub(crate) fn dispatch_pure_with(
|
|
|
738
757
|
padding.push(pad_chars[i % pad_chars.len()]);
|
|
739
758
|
}
|
|
740
759
|
|
|
741
|
-
let result = if width < 0 {
|
|
760
|
+
let result = if width < 0.0 {
|
|
742
761
|
// Left pad (negative width)
|
|
743
762
|
format!("{}{}", padding, string)
|
|
744
763
|
} else {
|