crdoconnor / strictyaml

Type-safe YAML parser and validator.
https://hitchdev.com/strictyaml/
MIT License
1.47k stars 60 forks source link

ruamel PendingDeprecationWarning #145

Open bede opened 3 years ago

bede commented 3 years ago

Hi! I'm a huge fan of strictyaml, thank you for releasing and maintaining it. Just FYI.

  /Users/bede/conda/envs/konsteltest/lib/python3.9/site-packages/strictyaml/parser.py:280: PendingDeprecationWarning: 
  load will be removed, use

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

  instead
    document = ruamelyaml.load(yaml_string, Loader=DynamicStrictYAMLLoader)

Python 3.9.2, abridged pip freeze:

ruamel.yaml==0.17.2
ruamel.yaml.clib==0.2.2
strictyaml==1.4.0

Does not replicate with ruamel.yaml==0.16.12

crdoconnor commented 3 years ago

Thanks I'll check it out.

On Fri, 2 Apr 2021, 16:07 Bede Constantinides, @.***> wrote:

Hi! I'm a huge fan of strictyaml, thank you for releasing and maintaining it. Just FYI.

/Users/bede/conda/envs/konsteltest/lib/python3.9/site-packages/strictyaml/parser.py:280: PendingDeprecationWarning: load will be removed, use

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

instead document = ruamelyaml.load(yaml_string, Loader=DynamicStrictYAMLLoader)

Python 3.9.2, abridged pip freeze:

ruamel.yaml==0.17.2 ruamel.yaml.clib==0.2.2 six==1.15.0 strictyaml==1.4.0

Does not replicate with ruamel.yaml==0.16.12

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crdoconnor/strictyaml/issues/145, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJKNNJGDQ6O2NXWJFRC3TTGXMU7ANCNFSM42I75VIA .

cowlinator commented 3 years ago

Also

venv\lib\site-packages\strictyaml\representation.py:270: PendingDeprecationWarning:
  dump will be removed, use

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

  instead
    dumped = dump(self.as_marked_up(), Dumper=StrictYAMLDumper, allow_unicode=True)

My pip freeze returns

ruamel.yaml==0.17.4
strictyaml==1.4.0
...
crdoconnor commented 3 years ago

Thanks for pointing it out. Will get to this tomorrow or day after.

On Tue, Apr 13, 2021 at 1:11 AM cowlinator @.***> wrote:

Also

venv\lib\site-packages\strictyaml\representation.py:270: PendingDeprecationWarning: dump will be removed, use

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

instead dumped = dump(self.as_marked_up(), Dumper=StrictYAMLDumper, allow_unicode=True)

My pip freeze returns

ruamel.yaml==0.17.4 strictyaml==1.4.0 ...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/crdoconnor/strictyaml/issues/145#issuecomment-818323125, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOJKNJLLRVWVWCZBYBQ5XTTIOD3JANCNFSM42I75VIA .

crdoconnor commented 3 years ago

It seems that it's not quite as simple as just putting in the suggested code. This might take a few more days.

trav3711 commented 1 year ago

I'm getting the same error for a python 3.11 migration

/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/strictyaml/parser.py:280: PendingDeprecationWarning: 
load will be removed, use

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

instead
  document = ruamelyaml.load(yaml_string, Loader=DynamicStrictYAMLLoader)
ERROR

pip freeze:

ruamel.yaml==0.17.4
strictyaml==1.4.2