sk- / git-lint

improving source code one step at a time
Apache License 2.0
236 stars 78 forks source link

Silence yaml load warning #142

Closed pfhayes closed 11 months ago

pfhayes commented 5 years ago
/home/venv/lib/python3.6/site-packages/gitlint/__init__.py:105: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  yaml_config = yaml.load(content)

We could preserve existing behaviour with yaml.full_load(content) or yaml.load(content, Loader=yaml.FullLoader) - that's up to the maintainer. But it seems to me that safe_load is most appropriate in this case.

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

jmolloy19 commented 4 years ago

I wish this merge request was accepted