← Back to issue list

many: update the yaml loading logic

View original Github issue

Metadata

Project
snapcraft
Number
#2065
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged after approval and CI checks, updating YAML loading to use safe loading where possible and resolving issue #2033.

Suggested action:

No scores available.

Issue body

Use safe loading where possible. Fixes #2033 LP: #1752344 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged after approval and CI checks, updating YAML loading to use safe loading where possible and resolving issue #2033.
qwen3.6-35b-a3b-mtp-q6 Merged after discussion on selective YAML updates. Implements safe loading to resolve #2033 and LP: #1752344.
qwen3.6-35b-a3b-mtp-q6 Merged. Updated YAML loading logic to use safe_load where possible, resolving issue #2033. The author clarified that remaining yaml.load instances were intentionally retained as they instantiate Python objects or parse external configuration files.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2218 yaml: replace yaml.safe_load() with CSafeLoader snapcraft merged Merged. Replaces yaml.safe_load() with CSafeLoader to fix bug lp:1787373. Reviewers requested extracting the logic into a dedicated helper function, which was implemented. The change improves parsing performance and was merged after code review.
74%
#3669 parts: raise error when duplicate keys are used snapcraft merged Merged. Refactored YAML loading into a new yaml_utils module and forward-ported safe loading to raise errors for duplicate keys in parts configuration. Approved by reviewer and passed CI.
71%