← Back to issue list

feat: multiple pydantic 2 fixes and papercuts

View original Github issue

Metadata

Project
craft-application
Number
#404
Type
pull request
State
merged
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #404 delivered multiple Pydantic 2 fixes: better error conversion, platform mappings, public regex validation, YAML-string output, and per-part validation.

Resolution: closed resolved

Reason: PR #404 was approved and merged. Its resolving commits include a130b31c for root-level error conversion, d49e539e for platform mappings, and 3d23ac0e for public regex validation.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This PR has multiple Pydantic 2-related changes (mostly fixes), needed for rockcraft. One per commit: - correctly convert root-level errors; - have `_populate_platforms()` return a dict of dicts; - make `get_validator_by_regex()` public (rockcraft has a different project name regex); - add `to_yaml_string()` utility method, analogous to `to_yaml_file()`; - validate each part individually; - drop the `value error, ` prefix in validation errors.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #404 delivered multiple Pydantic 2 fixes: better error conversion, platform mappings, public regex validation, YAML-string output, and per-part validation.
stealth/space-bunny-alpha — closed resolved Merged Pydantic 2 fixes in canonical/craft-application#404: root-error conversion, platform mapping, regex/YAML helpers, per-part validation, and cleaner validation errors.
qwen/qwen3.6-35b-a3b — — Merged Pydantic 2 fixes for rockcraft: root error conversion, updated platform dict, public regex validator, YAML utility, per-part validation, and refined error messages. Approved by two reviewers and merged across 9 files.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#103 feat: upgrade to pydantic 2.x craft-archives merged Merged PR #103 as commit b69f44a, upgrading craft-archives to Pydantic 2.x after three approvals; residual review feedback was moved to #118.
71%
#1777 feat(deps)!: switch to pydantic 2 charmcraft merged Breaking PR #1777 (commit 70078b03) migrated charmcraft to pydantic 2, absorbing the #1776 unused-code cleanup; merged into main via #1817 (394e6e55) after #1815 fixed YAML default-parts.
71%