← Back to issue list

chore(lint): get around pydantic 2.10.x bugs

View original Github issue

Metadata

Project
craft-store
Number
#238
Type
pull request
State
merged
Author
dariuszd21
Labels
Created
Updated
Closed

Current evaluation

Merged a workaround for pydantic 2.10.x bugs causing silent errors and Url comparison failures. Resolves compatibility issues in pydantic 2.10 and pydantic_core, approved by reviewers, and passed all CI checks.

Suggested action:

No scores available.

Issue body

- [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `tox`? Silent error, that was introduced with pydantic 2.10 release until it's fixed. For reference: https://github.com/pydantic/pydantic/issues/10950 https://github.com/canonical/craft-application/pull/566 There was also a change in `pydantic_core`, which made `Url` incomparable with `AnyHttpUrl`. Somehow in my local environment it only failed when tests were run through `tox`, not directly. From test logs: ``` FAILURE: check https://canonical.com/ == https://canonical.com/ test_registered_name_model.py:99 in test_unmarshal() -> check.equal(actual.website, pydantic.networks.HttpUrl(json_dict.get("website"))) ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged a workaround for pydantic 2.10.x bugs causing silent errors and Url comparison failures. Resolves compatibility issues in pydantic 2.10 and pydantic_core, approved by reviewers, and passed all CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged a workaround for pydantic 2.10.x bugs causing silent errors and URL comparison failures. The change bypasses the upstream issue until it is fixed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#33 chore!: update to Pydantic 2 craft-grammar merged Merged update to Pydantic 2. Resolves issue #32 by addressing breaking changes in grammar validation error messages. Approved by two reviewers, passed CI checks, and modified five files (+40/-41 lines).
79%
#566 chore(lint): get around a Pydantic 2.10.x type bug craft-application merged Merged a linting workaround to suppress spurious type-checking errors in mypy and pyright regarding Pydantic 2.10.x's field.default_factory(). The upstream bug will not be fixed, but the suppression approach was approved and merged.
78%
#778 chore: pydantic 2 related cleanup craft-parts merged Merged a Pydantic 2 compatibility cleanup. Approved by two reviewers and passed CI. Modified seven files with 28 additions and 26 deletions. Required PR #775.
77%
#207 chore(deps): drop Pydantic dependency craft-cli merged Merged changes remove the unused Pydantic dependency, resolving issue #201. Approved by two reviewers, passed CI checks, and reduced code by three lines across three files without impacting the 94.76% test coverage.
77%
#794 chore: remove pydantic warnings craft-parts merged Successfully merged after approval by two reviewers and passing CI checks. The changes remove pydantic warnings across 9 files, adding 30 lines and deleting 16 to clean up framework deprecation notices.
76%
#4955 chore!: migrate to pydantic 2 snapcraft merged Merged after two approvals and passing CI. Migrates the codebase to Pydantic 2, resolving issue #4941. The author rebased and force-pushed clean commits prior to a rebase-merge.
75%
#1817 chore: merge pydantic 2 support to main charmcraft merged Merged pydantic 2 support into the main branch after approval from two reviewers. The update modifies 52 files, adding 2860 lines and removing 714, completing the dependency upgrade.
75%
#112 chore(deps): update to pydantic 2 & bump-pydantic craft-archives closed The dependency update to Pydantic 2 was closed without merging. Lacking reviewer feedback, CI validation, and sustained activity, the pull request was abandoned.
74%
#36 chore!: update to pydantic 2 craft-grammar merged Merged the Pydantic 2 migration across five files. Approved by two reviewers and passed CI. The maintainer manually verified the author's Canonical employment to override an automated CLA check failure before finalizing the merge.
74%
#771 chore: lift-and-shift update to pydantic 2 craft-parts merged Merged after two approvals and passing CI. The update migrates the codebase to Pydantic 2 using bump-pydantic and manual fixes. It touched 38 files (+207/-127 lines) as the initial phase of the broader dependency upgrade.
73%