From 59e9094e97b20047effc440376b0d6250fe42a9f Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 5 Dec 2023 10:29:07 +0100 Subject: [PATCH 1/3] change env_file to dotenv (deprecated) --- geotrek/settings/base.py | 7 +++---- requirements.txt | 8 +++----- setup.py | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/geotrek/settings/base.py b/geotrek/settings/base.py index 3b6557e3e4..662865d43c 100644 --- a/geotrek/settings/base.py +++ b/geotrek/settings/base.py @@ -1,11 +1,10 @@ -import env_file import os import sys +from django.conf.global_settings import LANGUAGES as LANGUAGES_LIST from django.contrib.gis.geos import fromstr from django.contrib.messages import constants as messages -from django.conf.global_settings import LANGUAGES as LANGUAGES_LIST - +from dotenv import load_dotenv from easy_thumbnails.conf import Settings as easy_thumbnails_defaults from geotrek import __version__ @@ -33,7 +32,7 @@ def api_bbox(bbox, buffer): DOT_ENV_FILE = os.path.join(VAR_DIR, 'conf/env') if os.path.exists(DOT_ENV_FILE): - env_file.load(path=DOT_ENV_FILE) + load_dotenv(DOT_ENV_FILE) ALLOWED_HOSTS = os.getenv('SERVER_NAME', 'localhost').split(' ') ALLOWED_HOSTS = ['*' if host == '_' else host for host in ALLOWED_HOSTS] diff --git a/requirements.txt b/requirements.txt index dd6a036c01..4dc5366213 100644 --- a/requirements.txt +++ b/requirements.txt @@ -185,8 +185,6 @@ easy-thumbnails==2.8.5 # geotrek (setup.py) # mapentity # paperclip -env-file==2020.12.3 - # via geotrek (setup.py) filelock==3.15.4 # via django-large-image fiona==1.9.4.post1 @@ -292,6 +290,8 @@ pyphen==0.11.0 # via weasyprint python-dateutil==2.9.0.post0 # via celery +python-dotenv==1.0.0 + # via geotrek (setup.py) python-magic==0.4.27 # via paperclip pytz==2023.3.post1 @@ -369,9 +369,7 @@ urllib3==2.2.2 # via # requests # sentry-sdk -values==2020.12.3 - # via env-file -vine==5.1.0 +vine==5.0.0 # via # amqp # celery diff --git a/setup.py b/setup.py index d89233db88..34fca1b696 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ def run(self): 'chardet', 'cairosvg', 'cairocffi', - 'env_file', + 'python-dotenv', # pinned by requirements.txt 'pymemcache', 'coreschema', From 09eeb8f46b3fbe0084597e7c4e864caa5e77fc2b Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Wed, 5 Jun 2024 09:40:43 +0200 Subject: [PATCH 2/3] fix deps --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4dc5366213..677f02efc1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -369,7 +369,7 @@ urllib3==2.2.2 # via # requests # sentry-sdk -vine==5.0.0 +vine==5.1.0 # via # amqp # celery From 9b9f307619fa9b7402b5869764cbf1e8afabd080 Mon Sep 17 00:00:00 2001 From: Chatewgne Date: Tue, 20 Aug 2024 14:52:43 +0200 Subject: [PATCH 3/3] Add changelog --- docs/changelog.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index ac4d19d7f5..228e22b396 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -11,7 +11,12 @@ CHANGELOG **Documentation** -- Add authors, creators and last_author columns in displayed lists views and exports +- Add authors, creators and last_author columns in displayed lists views and exports + +**Maintenance** + +- Replace deprecated `env_file` with `dotenv` + 2.109.0 (2024-08-08) ----------------------------