-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
yaml.load(f) to yaml.load(f, Loader=yaml.FullLoader) #11910
Conversation
Thanks @AlexisTM. Can you check the Jenkins failures? |
@AlexisTM can you please rebase and check why Jenkins is failing? Thanks |
Sorry for the delay. Thanks @TSC21 for the reminder. |
The SITL test failed (performance wise) |
[worse sentence]: I don't have the error, do we have to enforce the + make validate_module_configs
Traceback (most recent call last):
File "/tmp/jenkins/workspace/PX4_Firmware_PR-11910/Tools/validate_yaml.py", line 49, in <module>
schema = load_yaml_file(schema_file)
File "/tmp/jenkins/workspace/PX4_Firmware_PR-11910/Tools/validate_yaml.py", line 43, in load_yaml_file
return yaml.load(stream, Loader=yaml.FullLoader)
AttributeError: 'module' object has no attribute 'FullLoader'
Makefile:438: recipe for target 'validate_module_configs' failed
make: *** [validate_module_configs] Error 123
script returned exit code 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI looks fine (up to an unrelated AppVeyor failure), let's merge.
@dagar I suspect the build machines to use old dependencies where the safe load of pyyaml was not yet implemented. The other possibility would be to use |
Describe problem solved by the proposed pull request
The widely used
yaml
has changed the API and forces to choose a Loader to avoid attacks from a yaml file. This made many application shouting the following:Describe your preferred solution
I am proposing to use of
FullLoader
to keep the Yaml specs functionalities.Describe possible alternatives
We can choose between the following loaders: