[Python-modules-commits] [cookiecutter] 02/07: Use PyYAML instead of poyo

Vincent Bernat bernat at moszumanska.debian.org
Sat May 28 13:18:06 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 cfc9baee3a75ee9a55d074305970be0e222837a2
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 fb69b47..af9e83c 100755
--- a/cookiecutter/config.py
+++ b/cookiecutter/config.py
@@ -14,7 +14,7 @@ import logging
 import os
 import io
 
-import poyo
+import yaml
 
 from .exceptions import ConfigDoesNotExistException
 from .exceptions import InvalidConfiguration
@@ -49,8 +49,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 5baa194..01f1ca2 100755
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ requirements = [
     'jinja2>=2.7',
     'click>=5.0',
     'whichcraft>=0.1.1',
-    '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