In my tests I'm seeing:
/home/patchwork/patchwork/patchwork/tests/api/validator.py:229:
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe. Please read https://msg.pyyaml.org/load
for full details.
Fix this by using the safe loader in the tests.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
'patchwork.yaml')
with open(spec_path, 'r') as fh:
- data = yaml.load(fh)
+ data = yaml.load(fh, Loader=yaml.SafeLoader)
_LOADED_SPECS[version] = openapi_core.create_spec(data)