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

Deprecation Warning depending on ruamel version #8

Closed
jonans opened this issue Apr 26, 2021 · 3 comments
Closed

Deprecation Warning depending on ruamel version #8

jonans opened this issue Apr 26, 2021 · 3 comments

Comments

@jonans
Copy link

jonans commented Apr 26, 2021

Thanks for this module , super useful quickly making configs.

So nothing is broken just getting deprecation warnings when running code under pytest. I get the following:

PendingDeprecationWarning: safe_load will be removed, use

yaml=YAML(typ='safe', pure=True)
yaml.load(...)

Maybe can do setup based based on ruamel version ? Details in project description: https://pypi.org/project/ruamel.yaml/

Also unrelated, if none of the "default_files" are found there is no error and FileNotFoundError is not thrown, is that intended ?

@dougscc
Copy link

dougscc commented Sep 1, 2021

I'm getting the same warnings:

tests/test_foo.py::test_paths_created
tests/test_foo.py::test_paths_created
tests/test_foo.py::test_yaml
tests/test_foo.py::test_yaml
  /home/somehuman/Projects/thing-im-testing/pro_ject/skeleton.py:39: PendingDeprecationWarning:
  dump will be removed, use

    yaml=YAML(typ='unsafe', pure=True)
    yaml.dump(...)

  instead
    yaml_text = yaml.dump(model_dict, Dumper=yaml.RoundTripDumper)

tests/test_foo.py::test_paths_created
tests/test_foo.py::test_paths_created
tests/test_foo.py::test_yaml
tests/test_foo.py::test_yaml
  /home/somehuman/Projects/thing-im-testing/.direnv/python-venv-3.8.11/lib/python3.8/site-packages/ruamel/yaml/main.py:1364: PendingDeprecationWarning:
  dump_all will be removed, use

    yaml=YAML(typ='unsafe', pure=True)
    yaml.dump_all(...)

  instead
    return dump_all(

Nothing appears to be actually wrong.

@lyz-code
Copy link

Maybe migrating to the community maintained ruyaml fork solves it

@ipmb
Copy link
Member

ipmb commented Mar 21, 2022

This was resolved in 3e79445

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

No branches or pull requests

4 participants