# HG changeset patch # User Ludovic Chabant # Date 1570204087 25200 # Node ID 727110ea112afedc7844bee603c25e2a55a1def5 # Parent ed308313bcdac8f7bf5b44e8a1e599c83d20dd64 core: Remove more YAML deprecation warnings. diff -r ed308313bcda -r 727110ea112a piecrust/commands/builtin/themes.py --- a/piecrust/commands/builtin/themes.py Tue Oct 01 07:35:50 2019 -0700 +++ b/piecrust/commands/builtin/themes.py Fri Oct 04 08:48:07 2019 -0700 @@ -75,7 +75,7 @@ if os.path.exists(info_path): info = None with open(info_path, 'r', encoding='utf8') as fp: - theme_cfg = yaml.load(fp.read()) + theme_cfg = yaml.safe_load(fp.read()) if isinstance(theme_cfg, dict): info = theme_cfg.get('theme') if info: diff -r ed308313bcda -r 727110ea112a piecrust/importing/jekyll.py --- a/piecrust/importing/jekyll.py Tue Oct 01 07:35:50 2019 -0700 +++ b/piecrust/importing/jekyll.py Fri Oct 04 08:48:07 2019 -0700 @@ -47,7 +47,7 @@ def convertConfig(self, app, src_path): logger.debug(" Converting configuration file.") with open(src_path, 'r', encoding='utf8') as fp: - config = yaml.load(fp) + config = yaml.safe_load(fp) if 'site' not in config: config['site'] = {} diff -r ed308313bcda -r 727110ea112a piecrust/importing/piecrust.py --- a/piecrust/importing/piecrust.py Tue Oct 01 07:35:50 2019 -0700 +++ b/piecrust/importing/piecrust.py Fri Oct 04 08:48:07 2019 -0700 @@ -96,7 +96,7 @@ shutil.rmtree(item_path) def convertConfig(self, content): - config = yaml.load(content) + config = yaml.safe_load(content) sitec = config.setdefault('site', {}) if 'templates_dirs' in sitec: tdc = sitec['templates_dirs'] diff -r ed308313bcda -r 727110ea112a piecrust/processing/pygments_style.py --- a/piecrust/processing/pygments_style.py Tue Oct 01 07:35:50 2019 -0700 +++ b/piecrust/processing/pygments_style.py Fri Oct 04 08:48:07 2019 -0700 @@ -11,7 +11,7 @@ def _doProcess(self, in_path, out_path): with open(in_path, 'r') as fp: - config = yaml.load(fp) + config = yaml.safe_load(fp) style_name = config.get('style', 'default') class_name = config.get('class', '.highlight') diff -r ed308313bcda -r 727110ea112a piecrust/processing/sitemap.py --- a/piecrust/processing/sitemap.py Tue Oct 01 07:35:50 2019 -0700 +++ b/piecrust/processing/sitemap.py Fri Oct 04 08:48:07 2019 -0700 @@ -36,7 +36,7 @@ def _doProcess(self, in_path, out_path): with open(in_path, 'r') as fp: - sitemap = yaml.load(fp) + sitemap = yaml.safe_load(fp) try: with open(out_path, 'w') as fp: