chtypes 2.0.0.dev7__tar.gz → 2.0.0.dev8__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.
Files changed (101) hide show
  1. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/CHANGELOG.md +12 -0
  2. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/PKG-INFO +1 -1
  3. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/pyproject.toml +1 -1
  4. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_decode.py +7 -1
  5. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/api/test_decode.py +21 -0
  6. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/uv.lock +1 -1
  7. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/.gitignore +0 -0
  8. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/LICENSE +0 -0
  9. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/README.md +0 -0
  10. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/__init__.py +0 -0
  11. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/__main__.py +0 -0
  12. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_abi2/__init__.py +0 -0
  13. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_abi2/_decls.py +0 -0
  14. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_abi2/_errmap.py +0 -0
  15. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_abi2/_errors.py +0 -0
  16. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_abi2/_loader.py +0 -0
  17. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_abi2/_vocab.py +0 -0
  18. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_codes.py +0 -0
  19. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ed25519.py +0 -0
  20. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_guard.py +0 -0
  21. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_input.py +0 -0
  22. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/__init__.py +0 -0
  23. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_channel.py +0 -0
  24. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_constants.py +0 -0
  25. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_dsse.py +0 -0
  26. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_ensure.py +0 -0
  27. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_errors.py +0 -0
  28. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_faults.py +0 -0
  29. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_goldens.py +0 -0
  30. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_hold.py +0 -0
  31. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_http.py +0 -0
  32. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_layout.py +0 -0
  33. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_lock.py +0 -0
  34. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_oci.py +0 -0
  35. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_prune.py +0 -0
  36. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_referrers.py +0 -0
  37. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_resolve.py +0 -0
  38. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_retired.py +0 -0
  39. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_ocifetch/_unpack.py +0 -0
  40. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/_setup.py +0 -0
  41. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/errors.py +0 -0
  42. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/library.py +0 -0
  43. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/py.typed +0 -0
  44. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/registry.py +0 -0
  45. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/src/chtypes/results.py +0 -0
  46. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/__init__.py +0 -0
  47. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/_stub_tree.py +0 -0
  48. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/conftest.py +0 -0
  49. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_conformance.py +0 -0
  50. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_dev_fingerprint.py +0 -0
  51. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_goldens_runner_stub.py +0 -0
  52. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_loader.py +0 -0
  53. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_public_library.py +0 -0
  54. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_public_open.py +0 -0
  55. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_public_registry.py +0 -0
  56. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_public_server.py +0 -0
  57. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_public_setup_cases.py +0 -0
  58. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_reader_rules.py +0 -0
  59. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_registry_fetch.py +0 -0
  60. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/abi2/test_registry_flight.py +0 -0
  61. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/api/__init__.py +0 -0
  62. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/api/test_input.py +0 -0
  63. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/api/test_trusted_keys.py +0 -0
  64. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/api/test_vocab.py +0 -0
  65. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/cli/__init__.py +0 -0
  66. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/cli/conftest.py +0 -0
  67. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/cli/test_devchannel.py +0 -0
  68. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/cli/test_main.py +0 -0
  69. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/cli/test_resolve_prune.py +0 -0
  70. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/conftest.py +0 -0
  71. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/goldens_v1/__init__.py +0 -0
  72. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/goldens_v1/data/stub-goldens.json +0 -0
  73. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/goldens_v1/test_runner.py +0 -0
  74. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/__init__.py +0 -0
  75. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/_bundle_support.py +0 -0
  76. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/_registry_support.py +0 -0
  77. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/_sign_support.py +0 -0
  78. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/conftest.py +0 -0
  79. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_cache_roots.py +0 -0
  80. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_cache_strict.py +0 -0
  81. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_conformance.py +0 -0
  82. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_devchannel.py +0 -0
  83. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_dsse.py +0 -0
  84. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_ensure.py +0 -0
  85. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_goldens.py +0 -0
  86. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_http.py +0 -0
  87. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_layout.py +0 -0
  88. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_lock.py +0 -0
  89. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_oci.py +0 -0
  90. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_prodv2_smoke.py +0 -0
  91. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_prodv2channel.py +0 -0
  92. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_retired.py +0 -0
  93. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_seam_gate.py +0 -0
  94. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/ocifetch/test_unpack.py +0 -0
  95. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_abi_identity.py +0 -0
  96. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_cache_roots_api.py +0 -0
  97. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_devchannel_registry.py +0 -0
  98. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_ed25519.py +0 -0
  99. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_examples_tour.py +0 -0
  100. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_fetch_options.py +0 -0
  101. {chtypes-2.0.0.dev7 → chtypes-2.0.0.dev8}/tests/test_support_v2_gen.py +0 -0
@@ -54,6 +54,17 @@ The four bindings in this repository are released together and give one answer,
54
54
  - **Enforcement gate restored** for `26.7` on `darwin-arm64`.
55
55
  - **Enforcement gate restored** for `26.8` on `darwin-arm64`.
56
56
  - **Enforcement gate restored** for `26.9` on `darwin-arm64`.
57
+ - **Enforcement gate lifted** for `26.3` on `linux-amd64`.
58
+ - **Enforcement gate lifted** for `26.7` on `linux-amd64`.
59
+ - **Enforcement gate lifted** for `26.8` on `linux-amd64`.
60
+ - **Enforcement gate lifted** for `26.9` on `linux-amd64`.
61
+ - **Enforcement gate lifted** for `26.3` on `linux-arm64`.
62
+ - **Enforcement gate lifted** for `26.7` on `linux-arm64`.
63
+ - **Enforcement gate lifted** for `26.8` on `linux-arm64`.
64
+ - **Enforcement gate lifted** for `26.9` on `linux-arm64`.
65
+ - **Enforcement gate lifted** for `26.7` on `darwin-arm64`.
66
+ - **Enforcement gate lifted** for `26.8` on `darwin-arm64`.
67
+ - **Enforcement gate lifted** for `26.9` on `darwin-arm64`.
57
68
 
58
69
  ### Removed
59
70
 
@@ -61,6 +72,7 @@ The four bindings in this repository are released together and give one answer,
61
72
 
62
73
  ### Fixed
63
74
 
75
+ - A declined export's payload is absent, as documented: it was an empty payload when the library returned a zero-length buffer for a declined export. `BatchResult.payload` and `spans` are `None` for a declined export. Whether an export was declined is decided from the document's `export_declined`, never from the buffer's length.
64
76
  - The layout's `index.json` never gains a second entry for one manifest (#487): concurrent installs of one build each appended an entry (7 or 8 entries for the same digest after 8 concurrent installs, measured on 1.0.2). The merge now deduplicates by digest, as Go and TypeScript do.
65
77
  - `--frozen` with a warm, verified cache makes zero requests, and `--frozen --offline` verifies the installed build against the lock with zero network (#414). An installed build whose `verified.json` is for the platform and records exactly the lock's pinned manifest, layer and bundle digests is used as it is. `--frozen --offline` is `CHTYPES_ARTIFACT_MISSING` when the pinned build is not installed, and `CHTYPES_ARTIFACT_PINNED` when there is no lock entry or the installed record does not match the pin; `--offline` without `--frozen` is unchanged. The `frozen-warm-cache-zero-requests`, `frozen-offline-lock-match`, `frozen-offline-lock-mismatch` and `frozen-offline-lock-not-installed` conformance cases hold all four bindings to it, under both corpora. The Python frozen path also compares the record's layer and bundle digests to the pin, and looks in the system directories too.
66
78
  - A 2.0.0-dev SDK whose own-fingerprint alias has expired, with a cached build of that fingerprint for the request, now says so in the `CHTYPES_ARTIFACT_UNPUBLISHED` message of `fetch` (#581): `; a cached build for this fingerprint (build <id>) is still usable by open; upgrade the SDK to get newer builds` is appended. The code, the exit status (4) and the cache are unchanged, and all four bindings give the same message (`fp-ahead-cached-own-fp`).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: chtypes
3
- Version: 2.0.0.dev7
3
+ Version: 2.0.0.dev8
4
4
  Summary: Python binding for the chtypes artifacts: ClickHouse's own type system, per version, behind the frozen chs_* C ABI
5
5
  Project-URL: Homepage, https://github.com/wave-rf/chtypes
6
6
  Project-URL: Repository, https://github.com/wave-rf/chtypes
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chtypes"
3
- version = "2.0.0.dev7"
3
+ version = "2.0.0.dev8"
4
4
  description = "Python binding for the chtypes artifacts: ClickHouse's own type system, per version, behind the frozen chs_* C ABI"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -428,6 +428,12 @@ def decode_batch(raw: bytes, export: bytes | None) -> BatchResult:
428
428
  framing = obj.get("framing")
429
429
  engine_rows = None if obj.get("engine_rows") is None else _engine_rows(obj, where)
430
430
  spans = None if obj.get("row_spans") is None else _spans(obj, "row_spans", where)
431
+ export_declined = _bytes(obj, "export_declined", where)
432
+ if export_declined:
433
+ # A declined export has no payload and no spans, whatever buffer the call
434
+ # returned: the library may hand back a zero-length one, so the document's
435
+ # export_declined decides, never the buffer's length.
436
+ export, spans = None, None
431
437
  return BatchResult(
432
438
  outcome=Outcome.of(_text(obj, "outcome", where)),
433
439
  err_code=_int(obj, "code", where),
@@ -439,7 +445,7 @@ def decode_batch(raw: bytes, export: bytes | None) -> BatchResult:
439
445
  engine_rows=engine_rows,
440
446
  payload=export,
441
447
  spans=spans,
442
- export_declined=_bytes(obj, "export_declined", where),
448
+ export_declined=export_declined,
443
449
  rows_passed=_u64(obj, "rows_passed", where),
444
450
  rows_cut=_u64(obj, "rows_cut", where),
445
451
  partition_count=_opt_u64(obj, "partition_count", where),
@@ -177,6 +177,27 @@ BATCH = {
177
177
  }
178
178
 
179
179
 
180
+ def test_a_declined_exports_payload_is_absent_whatever_the_buffer() -> None:
181
+ # The library returns a non-NULL, zero-length buffer for a declined export:
182
+ # the document's export_declined decides, never the buffer's length.
183
+ for member in (
184
+ {"export_declined": "only accepted batches export"},
185
+ {"export_declined_b64": b64(b"\xff")},
186
+ ):
187
+ doc = {"outcome": "rejected", "row_spans": [{"off": 0, "len": 1}], **member}
188
+ for buffer in (b"", b"x"):
189
+ batch = decode_batch(dumps(doc), buffer)
190
+ assert batch.payload is None and batch.spans is None and batch.export_declined
191
+
192
+
193
+ def test_an_accepted_zero_row_export_is_present_and_empty() -> None:
194
+ batch = decode_batch(
195
+ dumps({"outcome": "accepted", "row_spans": [], "export_declined": ""}), b""
196
+ )
197
+ assert batch.payload == b"" and batch.spans == () and batch.export_declined == b""
198
+ assert decode_batch(dumps({"outcome": "accepted"}), None).payload is None
199
+
200
+
180
201
  def test_a_batch_decodes_rows_payload_framing_and_spans() -> None:
181
202
  batch = decode_batch(dumps(BATCH), b"export bytes")
182
203
  assert batch.outcome is Outcome.ACCEPTED_POISONED
@@ -74,7 +74,7 @@ wheels = [
74
74
 
75
75
  [[package]]
76
76
  name = "chtypes"
77
- version = "2.0.0.dev7"
77
+ version = "2.0.0.dev8"
78
78
  source = { editable = "." }
79
79
  dependencies = [
80
80
  { name = "backports-zstd", marker = "python_full_version < '3.14'" },
File without changes
File without changes
File without changes