errors: update pydantic validation error checking (CRAFT-788)
Metadata
Current evaluation
Merged update to align craft-parts with Pydantic 1.9 by replacing plain dictionary error handling with TypedDict. Approved by reviewer, passed CI, and modified six files to correctly parse ErrorDict validation data.
Suggested action: —
No scores available.
Issue body
Pydantic 1.9 uses `TypedDict` to hold validation error information
instead of a plain dictionary. Update craft-parts to correctly
handle `ErrorDict` data.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged update to align craft-parts with Pydantic 1.9 by replacing plain dictionary error handling with TypedDict. Approved by reviewer, passed CI, and modified six files to correctly parse ErrorDict validation data. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged update to craft-parts error handling to support Pydantic 1.9's TypedDict for validation errors, replacing plain dictionary handling. Resolves CRAFT-788. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #94 errors: reformat pydantic validation error (CRAFT-368) | craft-parts | merged | Merged after reviewer approval and passing CI. Reformatted Pydantic validation errors for improved readability. Centralized formatting in charmcraft while preserving standalone craft-parts error handling. | |
| #601 feat: upgrade to pydantic 2.x | craft-parts | closed | The pydantic 2.x upgrade for craft-parts was closed as superseded after addressing review feedback on validation error reporting. The changes were replaced by a newer update. | |
| #401 build!: update to pydantic 2 | craft-application | merged | Merged to update the codebase to Pydantic 2. Approved by two reviewers and passed CI. The change modified 23 files (+531/-342). Initial test failures were resolved after the craft-grammar dependency received a corresponding update. | |
| #765 Update dependencies, specially unpinning pydantic now that craft-parts is up to it | charmcraft | merged | Merged after approval. Updated dependencies, specifically unpinning pydantic now that craft-parts supports the newer version. Changes span three files. | |
| #168 release: craft-parts 1.1.2 | craft-parts | merged | Merged release craft-parts 1.1.2. Unpins pydantic and pylint dependencies, fixes setup.py URL, resolves pydantic validation error handling, and removes unused requirements files. Approved by reviewer and passed CI checks. | |
| #927 feat(errors): include input value on pydantic errors | craft-application | merged | Merged pull request adding input values to pydantic errors, resolving issue #158 and CRAFT-2611. Approved by three reviewers with all CI checks passing. Changes span 8 files, adding 88 lines and removing 44. | |
| #160 release: craft-parts 1.1.1 | craft-parts | merged | Merged craft-parts 1.1.1 release after reviewer approval and passing CI. Updates pin pydantic and pydantic-yaml dependency versions across five files to stabilize builds. |