From ec8ad5e0237e7a34fa484d199ba2ea5507c4237e Mon Sep 17 00:00:00 2001 From: Spencer Yen Date: Thu, 27 Aug 2020 10:40:19 -0700 Subject: [PATCH] Fix yaml load deprecation --- litecoder/models/wof_locality.py | 2 +- tests/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litecoder/models/wof_locality.py b/litecoder/models/wof_locality.py index 3773cc0..c760e67 100644 --- a/litecoder/models/wof_locality.py +++ b/litecoder/models/wof_locality.py @@ -22,7 +22,7 @@ # TODO: Make pluggable. CITY_ALT_NAMES = yaml.load(pkgutil.get_data( 'litecoder', 'data/city-alt-names.yml' -)) +), Loader=yaml.FullLoader) ID_COLS = ( diff --git a/tests/utils.py b/tests/utils.py index f548f3f..4f1de3e 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -16,4 +16,4 @@ def read_yaml(from_path, file_name): path = os.path.join(os.path.dirname(from_path), file_name) with open(path, 'r') as fh: - return yaml.load(fh) + return yaml.load(fh, Loader=yaml.FullLoader)