croach / Flask-Fixtures

A simple library for adding database fixtures for unit tests using nothing but JSON or YAML.
MIT License
63 stars 30 forks source link

PyYAML deprecation warning #34

Open kmhsonnenkind opened 5 years ago

kmhsonnenkind commented 5 years ago

The YAMLLoader's load(filename) method calls PyYAML's corresponding load() function without an explicit Loader class. This has been deprecated since PyYAML version 5.1 because of potential security issues and produces a warning (see also https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation).

As PyYAML implicitely uses the safe FullLoader implementation if the parameter is omitted, this can be passed to its load() function without changing the behaviour of flask fixtures while still getting rid of the warning.