# HG changeset patch # User Ludovic Chabant # Date 1560296411 25200 # Node ID 5762a0b821ac64886da781c3805b8b787d33c03a # Parent 40a40305c4e144ed4b3661e3c1700ac207c33873 core: Remove yaml deprecation warning. diff -r 40a40305c4e1 -r 5762a0b821ac piecrust/processing/util.py --- a/piecrust/processing/util.py Tue Jun 11 15:14:20 2019 -0700 +++ b/piecrust/processing/util.py Tue Jun 11 16:40:11 2019 -0700 @@ -63,7 +63,7 @@ self._cache[path] = info with open(path, 'r') as fp: - config = yaml.load(fp) + config = yaml.load(fp, Loader=yaml.SafeLoader) info.files = config.get('files', []) info.delim = config.get('delim', "\n") diff -r 40a40305c4e1 -r 5762a0b821ac piecrust/themes/base.py --- a/piecrust/themes/base.py Tue Jun 11 15:14:20 2019 -0700 +++ b/piecrust/themes/base.py Tue Jun 11 16:40:11 2019 -0700 @@ -25,7 +25,7 @@ # TODO: make configs and themes load together to speed this up. config_path = os.path.join(self.root_dir, CONFIG_PATH) with open(config_path, 'r', encoding='utf8') as fp: - config = yaml.load(fp.read()) + config = yaml.load(fp.read(), Loader=yaml.SafeLoader) if not config: return None site_config = config.get('site', {})