Skip to content

Releases: frenck/YAMLRocks

v0.2.1: Lighter to load 🪨

13 Jun 20:13
Immutable release. Only release title and notes can be modified.
4e129b0

Choose a tag to compare

🪨 A lighter rock to pick up.

v0.2.0 made YAMLRocks run in parallel. v0.2.1 makes it quicker to even get going.

It turns out import yamlrocks was quietly pulling in asyncio (and through it ssl, logging, and friends) just to keep the async_* helpers ready, even if you never touched them. On a one-shot run that loads a small config and exits, that single import was most of the wall-clock time: enough to make us the slowest library on tiny files despite having the fastest parser. A bit embarrassing for a rock that brags about speed.

asyncio is now imported lazily, only when you actually await one of the async helpers. import yamlrocks drops from roughly 25 ms to roughly 2.5 ms, about 10x quicker, and the sync path carries none of it. A regression test keeps it honest.

Big thanks to @pdecat for the sharp diagnosis, -X importtime receipts and a cross-library, fresh-process benchmark included.

pip install yamlrocks

📚 Docs: https://yaml.rocks

Same rock. Quicker to pick up. 🪨

../Frenck

                       

Blogging my personal ramblings at frenck.dev

What's changed

🚀 Enhancements

  • ⚡ Import asyncio lazily so import yamlrocks stays cheap @frenck (#53)

v0.2.0: No GIL holding it back 🪨

13 Jun 15:29
Immutable release. Only release title and notes can be modified.
b9df623

Choose a tag to compare

🪨 The rock learns to run without the GIL.

The 0.1.x line was about getting YAMLRocks off the ground, and, memorably, about getting it to actually ship. 0.2.0 is about what it does now that it is flying.

The headline: free-threaded CPython is a first-class, shipped target. No-GIL wheels (cp314t) for Linux, macOS, and Windows, on x86_64 and ARM, glibc and musl. Run a free-threaded interpreter and pip install yamlrocks just hands you a wheel: no compiler, no GIL, no asterisks. Parse and emit YAML from as many threads as you have, no lock of our own in the way.

It got quicker on the way, too: a faster hashing path for the parser's key cache, and a tighter integer formatter on the dump side. Pure speed, byte-for-byte identical output.

And the part you do not see: every single wheel we ship is now built and run against the full test suite on its own platform, architecture, and libc. x86_64, aarch64, armv7, ppc64le, Windows on ARM, Alpine/musl, all of it. There is also a security bump (PyO3 0.29) that quietly closed a couple of advisories. "Rock-solid" stopped being just the tagline and became the CI.

pip install yamlrocks

📚 Docs: https://yaml.rocks

Same rock. Now it runs in parallel. 🪨

../Frenck

What's changed

✨ New features

  • ⚡ Build, test, and ship free-threaded (cp314t) wheels @frenck (#48)
  • ⚡ Build free-threaded wheels for emulated aarch64 and musllinux 64-bit @frenck (#51)

🚀 Enhancements

  • ⚡ Speed up the decode key cache with ahash and grow the emit buffer @frenck (#37)
  • ⚡ Format integers on the dumps path with itoa @frenck (#45)

🧰 Maintenance

  • 👷 Consolidate testing into one build-and-test flow @frenck (#31)
  • 👷 Test the musllinux wheels under a musl runtime (x86_64 native, ARM emulated) @frenck (#34)
  • 👷 Run the suite against the manylinux i686 wheel natively @frenck (#38)
  • 🔧 Refresh the oss-fuzz base image only once a month @frenck (#47)
  • ⚡ Build, test, and ship free-threaded (cp314t) wheels @frenck (#48)
  • 👷 Pin the in-container test pip installs for OpenSSF Scorecard @frenck (#50)
  • ⬆️ Update gcr.io/oss-fuzz-base/base-builder-rust:latest Docker digest to c3b8c5a @renovate[bot] (#46)
  • ⚡ Build free-threaded wheels for emulated aarch64 and musllinux 64-bit @frenck (#51)

⬆️ Dependency updates

13 changes

v0.1.3: Now with pre-flight checks 🪨

11 Jun 06:31
Immutable release. Only release title and notes can be modified.
8668466

Choose a tag to compare

🪨 The rock now checks the landing first.

v0.1.2 was going to be the one. Instead it sat in the queue forever, waiting for an Intel Mac runner that GitHub had quietly retired back in December, so the wheel build was politely holding out for a machine that no longer exists.

v0.1.3 fixes that (the macOS jobs moved to macOS 26) and, more to the point, it stops guessing: every wheel is now built and imported on its own platform and Python version before a tag is ever cut. So unlike the previous three attempts, this release was actually proven to work before you read this.

👉 What it is and everything it does: see the v0.1.0 release notes.

pip install yamlrocks

📚 Docs: https://yaml.rocks

Fourth time's the charm. The rock has well and truly landed. 🪨

What's changed

🧰 Maintenance

  • 👷 Reliable, continuously-tested wheel builds (fix retired macOS runners + shared build matrix) @frenck (#28)

⬆️ Dependency updates

v0.1.2: Third rock's the charm 🪨

10 Jun 21:29
Immutable release. Only release title and notes can be modified.
6957058

Choose a tag to compare

🪨 Third rock's the charm.

v0.1.1 was supposed to be "the one that actually ships." It was not. It tripped over s390x, an IBM mainframe architecture whose assembler is too old to recognize a CPU instruction from 2003, so a single wheel build face-planted and dragged the whole release down with it. So we dropped s390x, added Windows on ARM while we were in the neighborhood, and tried again.

v0.1.2 is that release, now actually on PyPI. For real this time.

👉 What it is and everything it does: see the v0.1.0 release notes.

pip install yamlrocks

📚 Docs: https://yaml.rocks

The rock keeps rolling. 🪨

../Frenck

                       

Blogging my personal ramblings at frenck.dev

What's changed

🚨 Breaking changes

  • 👷 Drop s390x from the release wheel matrix @frenck (#26)

✨ New features

🧰 Maintenance

  • 🔧 Stop Renovate from pinning the setup-python python-version @frenck (#25)
  • 👷 Build Windows arm64 wheels @frenck (#27)

📚 Documentation

v0.1.1: The one that actually ships 🪨

10 Jun 20:11
Immutable release. Only release title and notes can be modified.
b75fab1

Choose a tag to compare

🪨 Same rock, fewer pebbles.

v0.1.0 tripped over a Python that did not exist yet: a dependency bot pinned our release pipeline to CPython 3.14.6 about five minutes before the GitHub runners had ever heard of it, so the launch face-planted at the starting line. Very on brand for a 0.1.0.

v0.1.1 is that exact release, now actually on PyPI.

👉 What it is and everything it does: see the v0.1.0 release notes.

pip install yamlrocks

📚 Docs: https://yaml.rocks

The first rock has landed. 🪨

../Frenck

                       

Blogging my personal ramblings at frenck.dev

What's changed

🧰 Maintenance

  • Use major.minor Python for the release driver jobs @frenck (#23)

⬆️ Dependency updates

v0.1.0: First rock 🪨

10 Jun 19:26
Immutable release. Only release title and notes can be modified.
50b94fa

Choose a tag to compare

🪨 Hello, world! YAMLRocks is here!

This is the very first release of YAMLRocks, a fast, correct, rock-solid YAML library for Python, with a Rust core doing the heavy lifting. (Yes, the R in Rock is for Rust.)

The Python YAML ecosystem has long made you choose: fast (PyYAML's C loader, but YAML 1.1 only, no comments, no round-trip) or rich (ruamel.yaml, but pure Python and slow). YAMLRocks refuses that trade-off.

https://yaml.rocks

What you get

  • Fast. Roughly 5x to 10x faster parsing than PyYAML's C loader, and 15x to 19x faster serialization. Far more against ruamel.yaml.
  • Correct. YAML 1.2 by default, with an opt-in YAML 1.1 compatibility mode.
  • Secure by default. Hardened against the common YAML attack classes, with safe loading out of the box.
  • Round-trip that respects your file. Comments, anchors, and formatting are preserved, and an unmodified document re-emits byte-for-byte identical. Edit one value, and only that value is rewritten.
  • Native includes. !include resolution with write-back, so edits land in the right source file.
  • Annotated mode. Source locations (__line__, __column__, __file__) on every value, compatible with Home Assistant's annotated YAML.
  • Batteries included. JSON Schema validation, a PyYAML-compatible shim, rich standard-library type support, the !secret and !env_var config tags, and free-threaded (nogil) readiness.

A taste

import yamlrocks

data = yamlrocks.loads(b"key: value\nlist:\n  - 1\n  - 2")
# {'key': 'value', 'list': [1, 2]}

yamlrocks.dumps(data)
# b'key: value\nlist:\n  - 1\n  - 2\n'
pip install yamlrocks

Prebuilt wheels for Linux, macOS, and Windows across architectures, published via PyPI trusted publishing with build provenance and SBOMs attached.

Tested where it counts

Every release is verified against a reproducible real-world corpus: Home Assistant, ESPHome, Ansible, Kubernetes, Docker Compose, GitHub Actions, CloudFormation, Helm, OpenAPI, dbt, and more. Each of the 22,700 files must parse and round-trip byte-for-byte.

A note on the version

This is 0.1.0, and YAMLRocks is pre-1.0 software. The core promises are already firm: safe loading by default, YAML 1.2 semantics, reproducible real-world verification, and byte-for-byte round-trip for unmodified documents. Some advanced APIs may still shift before 1.0 as the project gathers production feedback. See the stability and roadmap page for the 1.0 contract.

📚 Docs: https://yaml.rocks

Thanks for taking the first rock for a spin. Issues, ideas, and pull requests are very welcome 🪨

../Frenck

                       

Blogging my personal ramblings at frenck.dev