← Back to issue list

fix(parts): set field defaults using default_factory (#629)

View original Github issue

Metadata

Project
craft-parts
Number
#641
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged backport #641 as commit ef9bbef6, applying #629 to give mutable PartSpec fields safe Pydantic default_factory defaults and fix PyRight errors.

Resolution: closed resolved

Reason: PR #641 was approved and merged as ef9bbef6, backporting the PartSpec default_factory fix from #629 onto the targeted branch.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Backport fix from 632f0933ef2308ac9eca75b9a74dc274af3320b6. - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged backport #641 as commit ef9bbef6, applying #629 to give mutable PartSpec fields safe Pydantic default_factory defaults and fix PyRight errors.
stealth/space-bunny-alpha — closed resolved Merged #641 as ef9bbef6, backporting #629 to use Pydantic default_factory for mutable PartSpec defaults and avoid shared default values.
stealth/space-bunny-alpha — closed resolved Merged #629 to use Pydantic default_factory for mutable PartSpec fields, backporting 632f0933; backport changes were also merged through #640 and #641.
qwen/qwen3.6-35b-a3b — — Merged a backport fix to set field defaults using default_factory. Approved by one reviewer, passed CI checks, and modified four files (+17/-9 lines).
qwen3.6-35b-a3b-mtp-q6 — — Merged a backport fix that sets field defaults using default_factory for the parts module, resolving initialization issues by applying the upstream commit directly.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-parts#629 (confidence 100%)

    Original fix merged as 5529031d; #641 carried it into this branch.

  • Related To: craft-parts#640 (confidence 95%)

    Separate merged backport of #629, committed as 6b05a101.

Related issues

Issue Project State Summary Similarity
#629 fix(parts): set field defaults using default_factory craft-parts merged Merged #629 as 5529031d, replacing mutable PartSpec defaults with Pydantic default_factory to fix PyRight errors for PartSpec(plugin="foo"); backported via #640 and #641.
94%
#640 fix(parts): set field defaults using default_factory (#629) craft-parts merged Merged as 6b05a101, cherry-picking #629 onto feature/namespaced-partitions to use default_factory for mutable PartSpec defaults, with Black 2024 formatting and a pytest 8 integration-test fix.
82%