kitovu-bot / kitovu

OpenHSR Connect 2
GNU General Public License v3.0
5 stars 2 forks source link

switch from deprecated yaml.load without a specific loader to a helper method #73

Open ThunderKey opened 5 years ago

ThunderKey commented 5 years ago

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

The-Compiler commented 5 years ago

Looks like tests fail - probably need to update PyYAML via pipenv (in Pipfile.lock) as well? Or maybe use yaml.load(input, Loader=yaml.SafeLoader) (untested) so it continues to work with older PyYAML versions too.

codecov[bot] commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@c27a25e). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #73   +/-   ##
=========================================
  Coverage          ?   98.19%           
=========================================
  Files             ?       30           
  Lines             ?     1777           
  Branches          ?      112           
=========================================
  Hits              ?     1745           
  Misses            ?       32           
  Partials          ?        0
Impacted Files Coverage Δ
src/kitovu/sync/settings.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c27a25e...f805920. Read the comment docs.

ThunderKey commented 5 years ago

Good catch. I've added the older version with the Loader parameter.

The-Compiler commented 5 years ago

yaml.Loader is the unsafe one though, and I don't think we need that? yaml.SafeLoader should work with both versions as well and not load any Python code.

ThunderKey commented 5 years ago

Thanks for the clarification. I had trouble with the documentation and what the different loaders actually do, so I kept the default behaviour. I've changed that now.