v0.3.7 #76
akhundMurad
announced in
Announcements
v0.3.7
#76
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Release v0.3.7 -- Rust-powered performance
This release is a big step toward “production-grade” TypeID usage in Python: the core implementation is now tuned for real-world throughput, packaging is aligned with native builds, and the project ships with reproducible benchmarks and clearer docs. ⚡
The headline change is a Rust-accelerated base32 codec (via a new
typeid._base32extension) and a move touuid-utilsfor UUIDv7 generation. Together with a set of internal optimizations (lazy UUID materialization, single-pass suffix validation, and cached string rendering), this brings substantial speedups in the hot paths. 🚀 Benchmarks included in-repo show mean times improving from ~3.47 µs → ~0.70 µs for generation, ~2.08 µs → ~1.30 µs for parsing, and ~5.52 µs → ~2.25 µs for an end-to-end workflow (generate → stringify → parse).Operationally, CI/CD has been reorganized around PR-focused tests and a tag-driven publish workflow. Publishing now builds wheels for multiple OSes and Python versions, sanity-checks native imports, uploads artifacts, publishes to PyPI, and then deploys docs. Documentation has been refreshed across the board (Quickstart tweaks, expanded
explaindocs, and a new Performance section that pulls directly from the benchmark README), and contributor guidance now explicitly covers the optional Rust acceleration workflow, benchmark discipline, and expectations around Python fallback.Breaking changes (read before upgrading)⚠️
This version changes a few foundational pieces that may affect downstream builds and integrations:
maturin(native extension) instead ofhatchling. If you build from source (sdist, editable installs, constrained build environments), you may now need Rust tooling available, depending on how you consume the package.uuid6touuid-utils, and the project’s UUID types in tests/CLI have been updated accordingly.typeid.base32API now operates onbytes(and is implemented by the Rust extension). Code that passedlist[int]or expecteddecode()to return a list will need adjustment.Migration guide
If you only install from PyPI wheels, the main work is adapting code that touches UUID helpers and base32 directly. If you build from source, also review the packaging notes below.
1) Replace
uuid6usage withuuid-utilsIf you pass UUID objects into
TypeID.from_uuid(), ensure they’reuuid_utils.UUIDinstances (or compatible) in your codebase.2) Update base32 encode/decode call sites (if you used them directly)
3) Packaging / builds (important for CI, Linux distros, and source installs)
maturinand has a Rust toolchain available when required.v*) and builds wheels across Linux/macOS/Windows with a native import sanity check.Notable additions and improvements
A few highlights worth calling out without turning this into a changelog dump:
TypeID.created_at(best-effort UTC datetime for UUIDv7; safelyNonefor nil/non-v7 values), plusuuid_bytesand internal caching/slots for lower overhead.bench/, committed raw JSON results, and a docs page that includes the benchmark narrative and numbers.If you maintain downstream packages or internal tooling that relies on the old build backend, UUID library, or base32 types, treat this as a “review-required” upgrade. Once migrated, you should see noticeably faster ID generation and parsing with no change to the core TypeID string format or everyday usage.
This discussion was created from the release v0.3.7.
Beta Was this translation helpful? Give feedback.
All reactions