You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
can be fixed with for example:
from yaml import CLoader as Loader, CDumper as Dumper
d= yaml.load(f, Loader=Loader)
The text was updated successfully, but these errors were encountered:
Looks like replacing yaml.load() with yaml.full_load() will definitely not break anything, because that's the current default loader.
Using yaml.safe_load() would probably work too, because as far as i can tell we're only using yaml to store Python dicts and lists (urbansim/utils/yamlio.py).
The only reference i can find for the different between "safe" and "full" loading is in the PyYaml code itself. It looks like "full" includes support for some python-specific data types like class instances.
My inclination would be to use safe_load() going forward, but perhaps use full_load() for updating older code, just to be certain we don't break anything that depends on the urbansim utilities..
Getting yaml.load() deprecation warning:
can be fixed with for example:
The text was updated successfully, but these errors were encountered: