Repository navigation
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.typedso type checkers pick up the bundled stubs by @MarshalX - Optimize DAG-CBOR encode by reusing a thread-local buffer and validating CIDs without
Multihashconstruction 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.0on decode and encode it as0.0by @MarshalX in #126 - Raise
RecursionErrorinstead of overflowing the stack when encoding deeply nested DAG-CBOR by @MarshalX in #128 - Document raised exceptions and normalize CAR header type errors to
ValueErrorby @MarshalX in #127 - Restructure single-file
lib.rsinto per-domain modules by @MarshalX in #114 - Replace
_PyDict_SetItem_KnownHashwith publicPyDict_SetItemby @MarshalX in #124 - Fix decode error handling:
PyListleak, unbounded preallocation, and swallowed errors indecode_dag_cbor_multiby @MarshalX in #117 - Fix list and
bytearrayraces under free-threading by @MarshalX in #130 - Fix Windows build after PyO3 0.29 by @MarshalX in #131
- Fix
encode_multibasedocs:'u'is base64url, not base58btc by @MarshalX in #132
Full Changelog: v3.4.1...v3.5.0