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

Fix YAML load warnings #4108

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

purhan
Copy link
Contributor

@purhan purhan commented Nov 17, 2020

Related to #3963

Technical

Testing

Screenshot

Stakeholders

@purhan
Copy link
Contributor Author

purhan commented Nov 17, 2020

@cclauss should I do the same for this as well?

with open('auth.yaml', 'r') as f:
self.config = yaml.load(f)

Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your contributions!

@cclauss cclauss merged commit c2bf070 into internetarchive:master Nov 17, 2020
@cclauss
Copy link
Contributor

cclauss commented May 4, 2021

@purhan Would you be willing to fix the three warnings in openlibrary/tests/test_docker_compose.py following the yaml.safe_load() pattern used here?

tests/test_docker_compose.py::TestDockerCompose::test_all_root_services_must_be_in_prod
  /home/runner/work/openlibrary/openlibrary/tests/test_docker_compose.py:18: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    root_dc = yaml.load(f)  # type: dict

tests/test_docker_compose.py::TestDockerCompose::test_all_root_services_must_be_in_prod
  /home/runner/work/openlibrary/openlibrary/tests/test_docker_compose.py:20: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    prod_dc = yaml.load(f)  # type: dict

tests/test_docker_compose.py::TestDockerCompose::test_all_prod_services_need_profile
  /home/runner/work/openlibrary/openlibrary/tests/test_docker_compose.py:33: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    prod_dc = yaml.load(f)  # type: dict

Just FYI @dhruvmanila

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.

2 participants