Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/requirements: update PyYAML to >=5.1 #20220

Merged
merged 1 commit into from Nov 5, 2019

Conversation

pabigot
Copy link
Collaborator

@pabigot pabigot commented Oct 29, 2019

sanitycheck now requires yaml.FullLoader to support generating
hardware maps. This feature was introduced in PyYAML 5.1.

Signed-off-by: Peter Bigot peter.bigot@nordicsemi.no

sanitycheck now requires yaml.FullLoader to support generating
hardware maps.  This feature was introduced in PyYAML 5.1.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
@ulfalizer
Copy link
Collaborator

ulfalizer commented Oct 29, 2019

Wonder if #20210 might make this moot and be compatible with both old and new PyYAML versions.

Looks like yaml.load(..., loader=yaml.Loader) works the same as yaml.load(..., loader=yaml.UnsafeLoader) with PyYAML >= 5.1, from digging through the code a bit.

IIRC there was some reason to not update PyYAML earlier, but can't remember what it was, and I'm not sure if there's still a reason. extract_dts_includes.py has a workaround that edtlib.py inherited (search for "add_constructor" in the code).

yaml/pyyaml#265 has some information too.

@ulfalizer
Copy link
Collaborator

Adding @mike-scott. He added commit 4278bf5 ("scripts/dts: Fix for PyYAML 5.1 Loader changes") back in March.

Copy link
Collaborator

@ulfalizer ulfalizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing it might just've been because it was so new back then. Fine with me in that case at least.

Copy link
Contributor

@mike-scott mike-scott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nashif nashif merged commit 1042b04 into zephyrproject-rtos:master Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants