What's changed
Upgrades pydantic from ^1.10.8 to ^2.7. Pydantic v1 has been in maintenance-only mode since mid-2023; this keeps the project current and compatible with the rest of the v2 ecosystem.
Breaking changes
Optionalfields now require explicit= Nonedefaults inhrflow/schemas.py— v2 no longer implicitly defaultsOptionaltoNoneLocation._fieldsrenamed toLocation.fields— v2 rejects leading-underscore field names- If you were monkey-patching or relying on
validate_assignmentbeing off, note that the no-opmodel_configdeclaration has been removed from test schemas
Files changed
hrflow/schemas.py— core model updateshrflow/scoring.py,hrflow/searching.py— util call site fixestests/utils/schemas.py— full rewrite away from v1-specific APIs (@root_validator,@validator,constr/conint/confloat/conlist)
Migration
If you use hrflow as a library and subclass or reference its Pydantic models directly, audit your Optional field defaults and any _-prefixed field names before upgrading.