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

[RST-6280] Support for YAML 6.0+ #2

Merged
merged 2 commits into from Nov 8, 2022
Merged

Conversation

ShivamThukral
Copy link
Contributor

@ShivamThukral ShivamThukral commented Nov 4, 2022

Added a line which will remove the error Error: load() missing 1 required positional argument: 'Loader'.
Related PR: yaml/pyyaml#561
The branch protection rules were not set for the master. I have added them as well. Please have a look at them too.
Tested versions:

  • python: 3.8
  • yaml: 6.0

@@ -168,7 +168,7 @@ def process_paths(paths, recursive, config, context):

def main():
try:
config = yaml.load(resource_string(__name__, 'config.yaml'))
config = yaml.load(resource_string(__name__, 'config.yaml'), Loader=yaml.FullLoader)

Choose a reason for hiding this comment

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

I think it is generally recommended to use the safe_load command instead of the load command.
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html
Which I think is basically the equivalent of Loader=yaml.SafeLoader.

Copy link
Member

@paulbovbel paulbovbel left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@ShivamThukral ShivamThukral merged commit 96c58e6 into master Nov 8, 2022
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

3 participants