diff --git a/setup.py b/setup.py index e01f4e1..7dd7d81 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,6 @@ setup( packages=find_packages(), include_package_data=True, install_requires=[ - 'pyyaml==3.*', 'ruamel.yaml==0.15.*', 'jinja2', 'pluggy>0.7<1.0' diff --git a/tljh/configurer.py b/tljh/configurer.py index 0cc4694..e8526d9 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -9,9 +9,9 @@ FIXME: A strong feeling that JSON Schema should be involved somehow. """ import os -import yaml -from tljh.config import CONFIG_FILE +from .config import CONFIG_FILE +from .yaml import yaml # Default configuration for tljh # User provided config is merged into this @@ -59,7 +59,7 @@ def load_config(config_file=CONFIG_FILE): """ if os.path.exists(config_file): with open(config_file) as f: - config_overrides = yaml.safe_load(f) + config_overrides = yaml.load(f) else: config_overrides = {} return _merge_dictionaries(dict(default), config_overrides) diff --git a/tljh/jupyterhub_config.py b/tljh/jupyterhub_config.py index 62c6db4..5012fcc 100644 --- a/tljh/jupyterhub_config.py +++ b/tljh/jupyterhub_config.py @@ -1,15 +1,15 @@ """ JupyterHub config for the littlest jupyterhub. """ -import copy -import os -import yaml + from glob import glob +import os from systemdspawner import SystemdSpawner from tljh import configurer, user from tljh.config import INSTALL_PREFIX, USER_ENV_PREFIX, CONFIG_DIR from tljh.normalize import generate_system_username +from tljh.yaml import yaml class UserCreatingSpawner(SystemdSpawner): @@ -54,7 +54,7 @@ c.SystemdSpawner.unit_name_template = 'jupyter-{USERNAME}' config_overrides_path = os.path.join(CONFIG_DIR, 'config.yaml') if os.path.exists(config_overrides_path): with open(config_overrides_path) as f: - config_overrides = yaml.safe_load(f) + config_overrides = yaml.load(f) else: config_overrides = {} configurer.apply_config(config_overrides, c)