fix: coerce numbers to strings
Metadata
Current evaluation
Closed unmerged as ineffective; merged PR canonical/craft-grammar#50 restored numeric-to-string coercion in commit 3c244fa.
Resolution: closed superseded
Reason: The author closed the unmerged PR after confirming its fix did not work and commented that it was superseded by #50. PR #50 later merged the effective fix as commit 3c244fa.
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/)?
- [ ] Have you successfully run `tox`?
-----
I thought this PR and this craft-application PR (https://github.com/canonical/craft-application/pull/465) would fix the pydantic v2 regressions: https://github.com/canonical/snapcraft/issues/5017, https://github.com/canonical/snapcraft/issues/4978
Unfortunately this is not working.
TODO: add regression tests
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged as ineffective; merged PR canonical/craft-grammar#50 restored numeric-to-string coercion in commit 3c244fa. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed unmerged because its coercion fix was ineffective; merged craft-grammar#50 superseded it as the effective solution in commit 3c244fa. | |
| qwen/qwen3.6-35b-a3b | — | — | Superseded by PR #50. The change attempted to fix pydantic v2 regressions by coercing numbers to strings but proved ineffective. It was closed without merging after the maintainer identified a superior solution. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/craft-grammar#50
(confidence 100%)
Merged replacement implementation, committed as 3c244fa.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #49 craft-grammar does not coerce numbers to strings in annotated types | craft-grammar | closed | Fixed numeric-to-string coercion for annotated types by merging canonical/craft-grammar#50 in commit 3c244fa; the ineffective, unmerged PR #46 was superseded. | |
| #465 tests: test number coercion | craft-application | closed | Closed unmerged after canonical/craft-grammar#50 fixed numeric-to-string coercion upstream, making the test-only changes in craft-application#465 obsolete. | |
| #450 fix(models): coerce numbers to strings by default | craft-application | merged | Merged #450 in dc1928f2, restoring numeric-to-string coercion in CraftBaseModel so numeric YAML values are accepted by string fields. | |
| #459 fix(models): coerce numbers to strings by default (#450) | craft-application | merged | Merged #450’s model fix in #459 (commit f175c968), restoring numeric-to-string coercion needed by downstream snapcraft#5017. | |
| #816 fix(parts): coerce numbers in input model | craft-parts | merged | Merged in commit 8b6d8db1 via #816, adding numeric-to-string coercion to the parts input model for the craft-parts portion of canonical/snapcraft#4978. |