Skip to content

v3.5.0

Latest

Choose a tag to compare

@MarshalX MarshalX released this 12 Oct 19:27
877cc46

What's Changed

🐍 Python 3.15 and free-threaded Python 3.14t / 3.15t wheels

⚡ Up to 2x faster DAG-CBOR encode, up to 10% faster decode

Encode v3.4.1 v3.5.0 Speedup
citm_catalog 1.04 ms 0.52 ms 2.01x (+101%)
github 0.05 ms 0.03 ms 1.78x (+78%)
twitter 0.47 ms 0.27 ms 1.74x (+74%)
canada 0.83 ms 0.64 ms 1.29x (+29%)
Decode v3.4.1 v3.5.0 Speedup
canada 4.22 ms 3.82 ms 1.10x (+10%)
torture_cids 63.5 ms 59.0 ms 1.08x (+8%)
github 0.07 ms 0.06 ms 1.06x (+6%)
atproto_repo.car 65.0 ms 61.8 ms 1.05x (+5%)
twitter 0.77 ms 0.75 ms 1.02x (+2%)
citm_catalog 1.71 ms 1.71 ms 1.00x (+0%)

❗ Behavior changes: -0.0 is now rejected on decode and encoded as 0.0, as the DAG-CBOR spec requires; encoding deeply nested data raises RecursionError instead of crashing; malformed CAR header types raise ValueError.

  • Add Python 3.15 support; bump PyO3 0.29 and deps, adopt Ruff 0.17 default rules by @MarshalX in #129
  • Add free-threaded wheels for Python 3.14t and 3.15t by @MarshalX in #130
  • Ship py.typed so type checkers pick up the bundled stubs by @MarshalX
  • Optimize DAG-CBOR encode by reusing a thread-local buffer and validating CIDs without Multihash construction by @MarshalX in #116
  • Optimize DAG-CBOR decode by reading each CBOR header once instead of re-decoding it per value by @MarshalX in #118
  • Optimize DAG-CBOR decode by reading multi-byte header arguments at a fixed width by @MarshalX in #121
  • Optimize DAG-CBOR encode by sorting map entries on a pooled stack and borrowing container items by @MarshalX in #122
  • Optimize DAG-CBOR encode/decode by dispatching leaf values inline and recursing only for containers by @MarshalX in #123
  • Forbid negative zero in DAG-CBOR: reject -0.0 on decode and encode it as 0.0 by @MarshalX in #126
  • Raise RecursionError instead of overflowing the stack when encoding deeply nested DAG-CBOR by @MarshalX in #128
  • Document raised exceptions and normalize CAR header type errors to ValueError by @MarshalX in #127
  • Restructure single-file lib.rs into per-domain modules by @MarshalX in #114
  • Replace _PyDict_SetItem_KnownHash with public PyDict_SetItem by @MarshalX in #124
  • Fix decode error handling: PyList leak, unbounded preallocation, and swallowed errors in decode_dag_cbor_multi by @MarshalX in #117
  • Fix list and bytearray races under free-threading by @MarshalX in #130
  • Fix Windows build after PyO3 0.29 by @MarshalX in #131
  • Fix encode_multibase docs: 'u' is base64url, not base58btc by @MarshalX in #132

Full Changelog: v3.4.1...v3.5.0