[Python-modules-commits] [cookiecutter] 04/08: Use PyYAML instead of poyo
Vincent Bernat
bernat at moszumanska.debian.org
Sun Dec 25 20:18:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
bernat pushed a commit to branch master
in repository cookiecutter.
commit 10b3508bd3aad4a5dc3e37f3b7bcd143ddad9c43
Author: Vincent Bernat <vincent at bernat.im>
Date: Sat May 28 15:06:44 2016 +0200
Use PyYAML instead of poyo
There is no problem with PyYAML in Debian and therefore, we don't need
to switch to poyo (a pure YAMLish parser).
---
cookiecutter/config.py | 6 +++---
setup.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cookiecutter/config.py b/cookiecutter/config.py
index 060e6ca..cd3bd23 100644
--- a/cookiecutter/config.py
+++ b/cookiecutter/config.py
@@ -13,7 +13,7 @@ import logging
import os
import io
-import poyo
+import yaml
from .exceptions import ConfigDoesNotExistException
from .exceptions import InvalidConfiguration
@@ -54,8 +54,8 @@ def get_config(config_path):
logger.debug('config_path is {0}'.format(config_path))
with io.open(config_path, encoding='utf-8') as file_handle:
try:
- yaml_dict = poyo.parse_string(file_handle.read())
- except poyo.exceptions.PoyoException as e:
+ yaml_dict = yaml.safe_load(file_handle.read())
+ except yaml.error.YAMLError as e:
raise InvalidConfiguration(
'Unable to parse YAML file {}. Error: {}'
''.format(config_path, e)
diff --git a/setup.py b/setup.py
index 5a45b5c..2805cd0 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ requirements = [
'jinja2>=2.7',
'click>=5.0',
'whichcraft>=0.4.0',
- 'poyo>=0.1.0',
+ 'PyYAML',
'jinja2-time>=0.1.0'
]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cookiecutter.git
More information about the Python-modules-commits
mailing list