← Back to issue list

meta: remove __dict__ usage in Snap

View original Github issue

Metadata

Project
snapcraft
Number
#2821
Type
pull request
State
closed
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Closed unmerged and superseded by smaller Snap refactor PRs after the author split the broad __dict__ cleanup to ease review.

Resolution: closed superseded

Reason: On 2020-01-08, cjp256 announced that the work would be broken into smaller PRs; repository metadata confirms #2821 was closed unmerged and superseded by those follow-ups.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- Remove `__dict__` usage in Snap and detail everything explicitly `from_dict()`, `to_dict()`, and `validate_required_keys()`. - Make Snap fully configurable upon init with exhaustive __init__ parameters. These changes will allow us to be more flexible going forward. There should be no behavioral changes other than changing a few dictionaries to OrderedDict(), which they presumably should be since we expected them to be ordered (as can be seen with the paired `sorted()` use).

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Closed unmerged and superseded by smaller Snap refactor PRs after the author split the broad __dict__ cleanup to ease review.
stealth/space-bunny-alpha — closed superseded Closed unmerged after being split into smaller Snap refactor PRs; the serialization portion continued in merged PR #2950 (5934e0009).
stealth/space-bunny-alpha — closed superseded Superseded by smaller Snap refactor PRs after cjp256 announced on 2020-01-08 that the broad __dict__ cleanup would be split up; this PR was not merged.
qwen/qwen3.6-35b-a3b — — Author closed and superseded the request by splitting the changes into smaller pull requests to ease review. Modifications replaced __dict__ usage with explicit serialization methods and exhaustive initialization parameters.
qwen3.6-35b-a3b-mtp-q6 — — Closed without merging. The author split the changes into smaller pull requests to ease review. The original work removed __dict__ usage in Snap, replaced generic serialization with explicit YAML methods, and switched to OrderedDict.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2953 meta: remove remaining `__dict__` and key list usage in snap snapcraft merged Merged PR #2953 in commit ef4d64e8d, removing remaining __dict__ and key-list usage from Snap metadata and fixing a Python 3.8 c901 label.
77%
#2950 meta: Snap to_dict() cleanup snapcraft merged Merged PR #2950 in commit 5934e0009, replacing __dict__-based Snap serialization with explicit properties and moving snap.yaml-specific output into to_snap_yaml_dict().
72%