Releases: explosion/confection
v1.3.3: Fix parsing of Python-style True/False/None
Config values True, False, and None (Python-style capitalised literals)
were silently kept as strings rather than being converted to their Python
types. This went unnoticed in older releases because pydantic v1's
parse_obj coerced the strings during validation. With the new built-in
type checker (which correctly requires actual bools), configs using the
capitalised forms broke.
Handle True/False/None in try_load_json as aliases for the JSON-style
true/false/null, and add regression tests covering both forms plus
quoted strings that must stay as strings.
v1.3.2: Don't import Pydantic v1 on Python 3.14
Avoid triggering warning.
v1.3.1: Minor type validation improvements
release-v1.3.1 Update to v1.3.1
v1.3.0: Refactor and improve validation
- Refactor library to properly separate config parsing, overrides, default filling, validation and promise resolution
- Rewrite type-checking code to be more reliable
v1.2.2: Improve Pydantic compatibility
Fix pydantic v2 compat: check model_fields/model_config before fields/config, respect Strict metadata in Annotated types
v1.2.1: Improve public interface type signatures
- Use TypeVar self-type pattern (_ConfigSelf, _CVESelf) so Config and
ConfigValidationError methods return the correct type for subclasses - Use type(self)() instead of Config() in interpolate/copy/merge so
subclass instances are preserved at runtime - Widen input parameters from Dict to Mapping and List to Sequence
where the parameter is read-only (overrides, updates, config params,
section_order) - Widen ConfigValidationError.config param to accept any Mapping
- Unify errors param type to Iterable[Mapping[str, Any]]
v1.2.0: Bug fxes
- Fix
Config.to_str()crash on*positional arg sections (#52). - Fix
_update_from_parsedcrash when a pydantic validator coerces a string to a dict (#54). - Coerce dict arguments to BaseModel instances for registered functions (#58, #59).
- Support top-level section references in interpolation (#61).
- Fix incomplete
${in config values crashingto_str().
v1.1.0: Replace Pydantic with custom validation logic, restore v0.1.5 config and registry algorithm
Pydantic v2 is stricter than v1 and I've been unable to replicate the behaviours we had in the config.
I had also attempted to refactor the library to make it easier to port, but this seems to have also introduced regressions.
To finally resolve this I'm dropping support for Pydantic in favour of a relatively small amount of custom validation logic. This should finally unblock spaCy and Thinc.
v1.0.0: Fix Pydantic v2 support
Properly support Pydantic v2
v1.0.0a2: Fix Pydantic v2 support
Fix support for Pydantic v2, and greatly extend tests