From 9e88f33c5eb89e47bbb0f00f193f6707517bb2c5 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Mon, 10 Aug 2020 20:09:57 -0400 Subject: [PATCH] Fix settings regression and unpin dynaconf Settings were failing to load with dynaconf>=3.0 because there was a breaking change that disabled environments loading [1]. Fixes: https://github.com/ansible-community/ara/issues/149 [1]: https://www.dynaconf.com/release_notes/#breaking-changes Change-Id: Ia97ba4a7f10aedc3b3c30b58beed68baa329cad3 --- ara/server/settings.py | 5 ++++- doc/requirements.txt | 4 +--- setup.cfg | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ara/server/settings.py b/ara/server/settings.py index da154613..98903a30 100644 --- a/ara/server/settings.py +++ b/ara/server/settings.py @@ -34,7 +34,10 @@ BASE_DIR = os.environ.get("ARA_BASE_DIR", os.path.expanduser("~/.ara/server")) DEFAULT_SETTINGS = os.path.join(BASE_DIR, "settings.yaml") settings = LazySettings( - GLOBAL_ENV_FOR_DYNACONF="ARA", ENVVAR_FOR_DYNACONF="ARA_SETTINGS", SETTINGS_MODULE_FOR_DYNACONF=DEFAULT_SETTINGS + environments=True, + GLOBAL_ENV_FOR_DYNACONF="ARA", + ENVVAR_FOR_DYNACONF="ARA_SETTINGS", + SETTINGS_MODULE_FOR_DYNACONF=DEFAULT_SETTINGS, ) # reread BASE_DIR since it might have gotten changed in the config file. diff --git a/doc/requirements.txt b/doc/requirements.txt index 6953e225..fc5d33de 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -12,9 +12,7 @@ djangorestframework>=3.9.1 django-cors-headers django-filter django-health-check -# Pin due to settings regression in 3.0 -# See https://github.com/ansible-community/ara/issues/149 -dynaconf[yaml]<3.0 +dynaconf[yaml] tzlocal whitenoise pygments diff --git a/setup.cfg b/setup.cfg index df555f1a..7ba50ecc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -61,9 +61,7 @@ server= django-cors-headers django-filter django-health-check - # Pin due to settings regression in 3.0 - # See https://github.com/ansible-community/ara/issues/149 - dynaconf[yaml]<3.0 + dynaconf[yaml] tzlocal whitenoise pygments