danhper / python-i18n

Easy to use i18n library for Python
https://pypi.python.org/pypi/python-i18n
MIT License
228 stars 45 forks source link

PyYAML warning on loaded (will be deprecated) #11

Closed osallou closed 5 years ago

osallou commented 5 years ago

Using yaml as load, a warning is raised:

/venv/lib64/python3.7/site-packages/i18n/loaders/yaml_loader.py:12: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.

return yaml.load(file_content)

This can be simply fixed with something like:

yaml.load(ymlfile, Loader=yaml.FullLoader)