v0.3.1: Errata ⚖️
⚖️ Errata
v0.3.0 was discovery: Probatio took in more kinds of evidence. v0.3.1 is the errata sheet. A close audit of the export and import layer turned up places where Probatio's output had drifted from voluptuous, and places where reading an untrusted JSON Schema quietly dropped a constraint. This release corrects the record.
The codecs now match their references. serialize (the voluptuous-serialize field-list shape that config-flow frontends consume) is back to byte-for-byte agreement: In over a mapping, the bare format and transform validators, Maybe, a None-first Any, Enum classes, Coerce of an enum, and a literal value all render the way voluptuous-serialize renders them. to_openapi learned parameterized generics, so list[int] and dict[str, int] become a typed array and object instead of an open schema.
The JSON Schema decoder stopped dropping constraints. from_json_schema now reads contains as "an element matches this subschema" (not "this literal is a member"), keeps a sibling type or range when it sits next to not/anyOf/oneOf/allOf instead of discarding it, honors uniqueItems under an explicit array type, and round-trips an array or object length correctly. Every one of these previously widened an untrusted schema, so this is a fail-closed fix as much as a correctness one.
The drop-in promise got tighter. A schema's extra policy (ALLOW_EXTRA, REMOVE_EXTRA) now reaches dict branches nested inside All, Any, Union, and SomeOf. Schema.extend accepts everything voluptuous accepted, and a marker's description can hold structured data again (the {"suggested_value": ...} dict Home Assistant stores there), not only a string.
⚠️ Behavior change
from_json_schema is now stricter for some external JSON Schemas: a value that slipped through before, because a constraint was being dropped, is correctly rejected now. Round-trips of Probatio's own to_json_schema output are unaffected.
🐍 Python
The support floor drops to Python 3.12, and 3.15 joins the tested set. Probatio now runs on 3.12, 3.13, 3.14, and 3.15.
This is still a 0.x release: a faithful drop-in for voluptuous, validated against its behavior, with some internals still free to move before 1.0.
pip install probatio📚 Docs: https://probatio.frenck.dev
Put your data to the proof. ⚖️
../Frenck
Blogging my personal ramblings at frenck.dev
What's changed
🐛 Bug fixes
- Serialize a literal mapping value as a constant field @frenck (#30)
- Propagate a schema's extra policy into combinator branches @frenck (#31)
- Match voluptuous-serialize output across more validators @frenck (#32)
- Render parameterized generics in the OpenAPI codec @frenck (#33)
- Fix dropped and mis-decoded constraints in the JSON Schema decoder @frenck (#34)
- Widen extend and marker description types for the drop-in promise @frenck (#35)