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

Deprecated call to yaml.load #288

Closed
jgbarah opened this issue Mar 27, 2019 · 6 comments
Closed

Deprecated call to yaml.load #288

jgbarah opened this issue Mar 27, 2019 · 6 comments
Labels
bug good first issue Good issue for first-time contributors help wanted

Comments

@jgbarah
Copy link
Contributor

jgbarah commented Mar 27, 2019

When launching sirmordred with any configuration, you see two warnings:

Starting SirMordred to build a GrimoireLab dashboard
This will usually take a while...
/usr/local/lib/python3.5/dist-packages/sirmordred/task_panels.py:180: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  self.panels_menu = yaml.load(f)
/usr/local/lib/python3.5/dist-packages/sirmordred/task_panels.py:437: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  self.panels_menu = yaml.load(f)

I think the fix is easy: just call yaml.load() with a Loader parameter.

I know this is not exactly a bug, since it produces the right output. But I'm labeling as bug because it is kindda confusing for the user, anyway...

@jgbarah jgbarah added bug help wanted good first issue Good issue for first-time contributors labels Mar 27, 2019
@valeriocos
Copy link
Member

The fix should be similar to the code in this PR: chaoss/grimoirelab-sortinghat#200

@sumitskj this could be good for you for micro-task 9, what do you think ? :)

@sumitskj
Copy link
Contributor

The fix should be similar to the code in this PR: chaoss/grimoirelab-sortinghat#200

@sumitskj this could be good for you for micro-task 9, what do you think ? :)

Sure, I will try to fix this

@valeriocos
Copy link
Member

great! thank you @sumitskj

@sumitskj
Copy link
Contributor

sumitskj commented Mar 27, 2019

I have added the Loader param in yaml.load() #289 but it has failed to pass tests. Can you see this @jgbarah @valeriocos .

@valeriocos
Copy link
Member

valeriocos commented Mar 27, 2019

Thank you for working on this issue @sumitskj .The tests fail due to a missing package. I'll make a local test and merge it

@valeriocos
Copy link
Member

Merged, thank you @sumitskj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good issue for first-time contributors help wanted
Projects
None yet
Development

No branches or pull requests

3 participants