← Back to issue list

chore: fix pydantic deprecation

View original Github issue

Metadata

Project
craft-grammar
Number
#35
Type
pull request
State
merged
Author
dariuszd21
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #35 (commit 6be0fc3) updated custom type validation to address Pydantic 2's deprecated __get_validators__ hook.

Resolution: closed resolved

Reason: The approved PR was merged as commit 6be0fc3, replacing the deprecated validation approach so craft-grammar remains compatible with Pydantic 2.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the guidelines for contributing? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `tox`? `__get_validators__` will be removed and it is deprecated in pydantic 2.0 https://docs.pydantic.dev/latest/migration/#defining-custom-types

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #35 (commit 6be0fc3) updated custom type validation to address Pydantic 2's deprecated __get_validators__ hook.
stealth/space-bunny-alpha — closed resolved Merged PR #35 (commit 6be0fc3) fixed the Pydantic 2 deprecation of __get_validators__ by updating the custom type validator.
qwen/qwen3.6-35b-a3b — — Merged to fix pydantic 2.0 deprecation warnings for __get_validators__. The change updates custom type definitions per migration guidelines, passed CI and coverage checks, and received two approvals.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#33 chore!: update to Pydantic 2 craft-grammar merged Merged as commit 5e225fb via PR #33, updating craft-grammar to Pydantic 2 and revising grammar validation errors; fixes #32.
78%
#36 chore!: update to pydantic 2 craft-grammar merged Merged PR #36 (commit 06fc994), completing the breaking Pydantic 2 update after two approvals and manual confirmation of the author's CLA employment status.
77%
#612 chore: cleanup pydantic warnings craft-providers merged Merged PR #612 as commit c106d34, cleaning up Pydantic warnings with a minimal two-file configuration change.
76%
#112 chore(deps): update to pydantic 2 & bump-pydantic craft-archives closed Closed unmerged; its Pydantic 2 migration was superseded by #103 (b69f44a) and merged into main through #123.
75%
#794 chore: remove pydantic warnings craft-parts merged Merged as commit 5c1c7dd3, incorporating craft-archives PR #122 (commit 00b9b3b) to eliminate Pydantic deprecation warnings.
75%
#28 chore(deps): update dependency pydantic to v2 - autoclosed craft-grammar closed Renovate's Pydantic 2 bump was closed unmerged and superseded by dedicated migration PR #33, which landed in commit 5e225fb.
74%
#370 chore(deps): update dependency pydantic to v2 craft-providers closed Renovate pydantic v2 bump closed unmerged by mr-cal to defer migration to a larger craft effort; the upgrade later landed in merged PR #451 (commit f380a9e) for 2.0.
74%
#122 chore: eliminate pydantic warnings craft-archives merged Merged PR #122 eliminated Pydantic warnings, landing as commit 00b9b3b after approval by two reviewers.
74%
#163 chore(deps): update dependency pydantic to v2 craft-application closed Renovate’s Pydantic 2.5.2 bump was closed unmerged and later replaced by merged migration PR #401 (commit c2f0978a).
73%
#771 chore: lift-and-shift update to pydantic 2 craft-parts merged Merged PR #771 as commit 6b155294, completing phase 1 of the Pydantic 2 migration across 38 files using bump-pydantic and follow-up fixes.
73%