[PATCH 1/7] gnu: Add python-flake8-debugger.

DoneSubmitted by Giacomo Leidi.
Details
3 participants
  • Efraim Flashner
  • Giacomo Leidi
  • Sarah Morgensen
Owner
unassigned
Severity
normal
Merged with
G
G
Giacomo Leidi wrote on 2 Aug 2021 20:13
(address . guix-patches@gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210802181359.10695-1-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-flake8-debugger): New variable.
---
gnu/packages/python-xyz.scm | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 61db9febb8..fc7f08a720 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -64,7 +64,7 @@
 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
-;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
@@ -9456,6 +9456,31 @@ These should be used in preference to using a backslash for line continuation.
 @end quotation")
     (license license:asl2.0)))
 
+(define-public python-flake8-debugger
+  (package
+    (name "python-flake8-debugger")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-debugger" version))
+       (sha256
+        (base32
+         "19pdfx0rb3k1i8hxfjdi8ndd6ayzq8g1041j8zdq256vyxvwfgg4"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flake8" ,python-flake8)
+       ("python-pycodestyle" ,python-pycodestyle)
+       ("python-six" ,python-six)))
+    (home-page
+     "https://github.com/jbkahn/flake8-debugger")
+    (synopsis
+     "Ipdb/pdb statement checker plugin for flake8")
+    (description
+     "This package provides the @code{flake8-debugger} Python module,
+an ipdb/pdb statement checker plugin for flake8.")
+    (license license:expat)))
+
 (define-public python-flake8-implicit-str-concat
   (package
     (name "python-flake8-implicit-str-concat")

base-commit: f12a35cfa22092a7e3157c94abfef8335f86ac1c
-- 
2.32.0
S
S
Sarah Morgensen wrote on 2 Aug 2021 23:13
control message for bug #49281
(address . control@debbugs.gnu.org)
86pmuv4kjq.fsf@mgsn.dev
merge 49281 49835 49834 49833 49832 49831 49830 49829
thanks
S
S
Sarah Morgensen wrote on 4 Aug 2021 20:26
Re: bug#49281: Add dynaconf
(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
86im0l2hj0.fsf@mgsn.dev
Hello again,

Thanks for the revised patches. I was able to apply your patches and
take a closer look, and found a few more things. (Sorry!)

Giacomo Leidi <goodoldpaul@autistici.org> writes:

Toggle quote (47 lines)
> * gnu/packages/python-xyz.scm (python-flake8-debugger): New variable.
> ---
> gnu/packages/python-xyz.scm | 27 ++++++++++++++++++++++++++-
> 1 file changed, 26 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 61db9febb8..fc7f08a720 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -64,7 +64,7 @@
> ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
> ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
> ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
> -;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
> +;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
> ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
> ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
> ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
> @@ -9456,6 +9456,31 @@ These should be used in preference to using a backslash for line continuation.
> @end quotation")
> (license license:asl2.0)))
>
> +(define-public python-flake8-debugger
> + (package
> + (name "python-flake8-debugger")
> + (version "4.0.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "flake8-debugger" version))
> + (sha256
> + (base32
> + "19pdfx0rb3k1i8hxfjdi8ndd6ayzq8g1041j8zdq256vyxvwfgg4"))))
> + (build-system python-build-system)
> + (propagated-inputs
> + `(("python-flake8" ,python-flake8)
> + ("python-pycodestyle" ,python-pycodestyle)
> + ("python-six" ,python-six)))
> + (home-page
> + "https://github.com/jbkahn/flake8-debugger")
> + (synopsis
> + "Ipdb/pdb statement checker plugin for flake8")
> + (description
> + "This package provides the @code{flake8-debugger} Python module,
> +an ipdb/pdb statement checker plugin for flake8.")
> + (license license:expat)))

The pyproject.toml file does say this is "MIT" (= expat), but there's no
actual license file in the project. I don't think this is sufficient as
far as Guix is concerned (perhaps an actual maintainer/committer can
comment?)

Toggle quote (7 lines)
> +
> (define-public python-flake8-implicit-str-concat
> (package
> (name "python-flake8-implicit-str-concat")
>
> base-commit: f12a35cfa22092a7e3157c94abfef8335f86ac1c

--
Sarah
P
Re: bug#49834: Add dynaconf
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)(address . 49834@debbugs.gnu.org)
6567b413-0db6-5d1e-e979-7807fa086a99@autistici.org
Dear Sarah,

thank you for your review!

On 8/4/21 8:26 PM, Sarah Morgensen wrote:
Toggle quote (5 lines)
> The pyproject.toml file does say this is "MIT" (= expat), but there's no
> actual license file in the project. I don't think this is sufficient as
> far as Guix is concerned (perhaps an actual maintainer/committer can
> comment?)

First of all I opened an upstream PR [0] to add an actual LICENSE file:
I hope that, given its simplicity, it will get merged soon.

I'm no expert about this but I tried building dynaconf without
flake8-debugger and it seems to work flawlessly. The dependency was put
there by the python importer, probably the developers have it in some
dev-dependencies declaration needed to commit well-formatted code in the
repository.

Since flake8-debugger doesn't appear to be required for the inclusion of
dynaconf maybe we can exclude it for this time and whenever the PR will
be merged I'll open another Guix issue to add it.

What do you think about this approach? (I'm attaching an updated
patch-set without flake8-debugger and rebased on current master).


Thank you for your time :)


Giacomo


G
G
Giacomo Leidi wrote on 28 Aug 2021 13:51
[PATCH 1/6] gnu: Add python-flake8-todo.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210828115153.5607-1-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-flake8-todo): New variable.
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 59eb473857..1e4f04337d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9613,6 +9613,29 @@ lints.")
     (description "This package provides a Flake8 lint for quotes.")
     (license license:expat)))
 
+(define-public python-flake8-todo
+  (package
+    (name "python-flake8-todo")
+    (version "0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flake8-todo" version))
+       (sha256
+        (base32
+         "05arm0sch3r8248035kilmf01z0mxsahw6vpbbz0d343zy8m8k3f"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-pycodestyle" ,python-pycodestyle)))
+    (home-page
+     "https://github.com/schlamar/flake8-todo")
+    (synopsis
+     "TODO notes checker, plugin for flake8")
+    (description
+     "This package provides the @code{flake8-todo} Python module, a
+TODO notes checker plugin for flake8.")
+    (license license:expat)))
+
 (define-public python-autoflake
   (package
     (name "python-autoflake")

base-commit: 75a3413b4e5c1f7443eb944a36ff364f4c4085f4
-- 
2.33.0
G
G
Giacomo Leidi wrote on 28 Aug 2021 13:51
[PATCH 2/6] gnu: Add python-dotenv.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210828115153.5607-2-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-dotenv): New variable.
---
gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1e4f04337d..128ac9fd0c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26297,3 +26297,30 @@ a (rather superficial) static analysis, and constructs a directed graph of the
 objects in the combined source, and how they define or use each other.  The
 graph can be output for rendering by GraphViz or yEd.")
     (license license:gpl2)))
+
+(define-public python-dotenv
+  (package
+    (name "python-dotenv")
+    (version "0.18.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-click" ,python-click-5)))
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
+       ("python-sh" ,python-sh)))
+    (home-page
+     "https://github.com/theskumar/python-dotenv")
+    (synopsis
+     "Setup environment variables according to .env files")
+    (description
+     "This package provides the @code{python-dotenv} Python module to
+read key-value pairs from a .env file and set them as environment variables")
+    (license license:bsd-3)))
-- 
2.33.0
G
G
Giacomo Leidi wrote on 28 Aug 2021 13:51
[PATCH 3/6] gnu: Add python-box.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210828115153.5607-3-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-box): New variable.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 128ac9fd0c..caff26e872 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26324,3 +26324,27 @@ graph can be output for rendering by GraphViz or yEd.")
      "This package provides the @code{python-dotenv} Python module to
 read key-value pairs from a .env file and set them as environment variables")
     (license license:bsd-3)))
+
+(define-public python-box
+  (package
+    (name "python-box")
+    (version "5.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-box" version))
+       (sha256
+        (base32
+         "0jhrdif57khx2hsw1q6a9x42knwcvq8ijgqyq1jmll6y6ifyzm2f"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-msgpack" ,python-msgpack)
+       ("python-ruamel.yaml" ,python-ruamel.yaml)
+       ("python-toml" ,python-toml)))
+    (home-page "https://github.com/cdgriffith/Box")
+    (synopsis
+     "Advanced Python dictionaries with dot notation access")
+    (description
+     "This package provides the @code{python-box} Python module.
+It implements advanced Python dictionaries with dot notation access.")
+    (license license:expat)))
-- 
2.33.0
G
G
Giacomo Leidi wrote on 28 Aug 2021 13:51
[PATCH 5/6] gnu: Add python-pep8-naming.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210828115153.5607-5-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-pep8-naming): New variable.
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index caff26e872..afece6381c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9242,6 +9242,31 @@ PEP 8.")
 (define-public python2-pep8
   (package-with-python2 python-pep8))
 
+(define-public python-pep8-naming
+  (package
+    (name "python-pep8-naming")
+    (version "0.12.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pep8-naming" version))
+       (sha256
+        (base32
+         "04kyh9hkpyc8jzj16d1kkk29b5n8miqdvbs0zm035n1z5z5kx6hz"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flake8" ,python-flake8)
+       ("python-flake8-polyfill"
+        ,python-flake8-polyfill)))
+    (home-page
+     "https://github.com/PyCQA/pep8-naming")
+    (synopsis
+     "Check PEP-8 naming conventions")
+    (description
+     "This package provides the @code{pep8-naming} Python module, a
+plugin for flake8 to check PEP-8 naming conventions.")
+    (license license:expat)))
+
 (define-public python-pep517
   (package
     (inherit python-pep517-bootstrap)
-- 
2.33.0
G
G
Giacomo Leidi wrote on 28 Aug 2021 13:51
[PATCH 4/6] gnu: python-ruamel.yaml: Update to 0.17.10.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210828115153.5607-4-goodoldpaul@autistici.org
* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10.
---
gnu/packages/serialization.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 0e79b7c89c..b8f21f2375 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -532,14 +532,14 @@ it is comparable to protobuf.")
 (define-public python-ruamel.yaml
   (package
     (name "python-ruamel.yaml")
-    (version "0.15.83")
+    (version "0.17.10")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ruamel.yaml" version))
        (sha256
         (base32
-         "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw"))))
+         "0rwywdbmy20qwssccydpaval2vq36825fiva374zf3vavkbchsqh"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-- 
2.33.0
G
G
Giacomo Leidi wrote on 28 Aug 2021 13:51
[PATCH 6/6] gnu: Add dynaconf.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210828115153.5607-6-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-colorama-0.4.1): New variable,
(python-dotenv-0.13.0): New variable,
(dynaconf): New variable.
* gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
* local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
.../dynaconf-Unvendor-dependencies.patch | 161 ++++++++++++++++++
gnu/packages/python-xyz.scm | 94 ++++++++++
3 files changed, 256 insertions(+)
create mode 100644 gnu/packages/patches/dynaconf-Unvendor-dependencies.patch

Toggle diff (304 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 14cd1cc6ad..4e76b5a2b3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -977,6 +977,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
   %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch	\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
+  %D%/packages/patches/dynaconf-Unvendor-dependencies.patch 		\
   %D%/packages/patches/ecl-16-format-directive-limit.patch	\
   %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch	\
   %D%/packages/patches/ecl-16-libffi.patch			\
diff --git a/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
new file mode 100644
index 0000000000..10b72d5013
--- /dev/null
+++ b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
@@ -0,0 +1,161 @@
+From 3558d30d5916ec6a91ce0d9c201ff9a11675d7c3 Mon Sep 17 00:00:00 2001
+From: Giacomo Leidi <goodoldpaul@autistici.org>
+Date: Mon, 2 Aug 2021 19:29:07 +0200
+Subject: [PATCH] Use system dependencies.
+
+Box was not unvendored because it appears to be heavily patched.
+---
+ dynaconf/cli.py                   | 4 ++--
+ dynaconf/default_settings.py      | 2 +-
+ dynaconf/loaders/env_loader.py    | 2 +-
+ dynaconf/loaders/toml_loader.py   | 2 +-
+ dynaconf/loaders/yaml_loader.py   | 2 +-
+ dynaconf/utils/parse_conf.py      | 2 +-
+ dynaconf/vendor/box/converters.py | 6 +++---
+ dynaconf/vendor/box/from_file.py  | 6 +++---
+ tests/test_cli.py                 | 2 +-
+ 9 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/dynaconf/cli.py b/dynaconf/cli.py
+index 2d45e52..7df767a 100644
+--- a/dynaconf/cli.py
++++ b/dynaconf/cli.py
+@@ -20,8 +20,8 @@ from dynaconf.utils.functional import empty
+ from dynaconf.utils.parse_conf import parse_conf_data
+ from dynaconf.validator import ValidationError
+ from dynaconf.validator import Validator
+-from dynaconf.vendor import click
+-from dynaconf.vendor import toml
++import click
++import toml
+ 
+ 
+ CWD = Path.cwd()
+diff --git a/dynaconf/default_settings.py b/dynaconf/default_settings.py
+index 66601b0..9605fc5 100644
+--- a/dynaconf/default_settings.py
++++ b/dynaconf/default_settings.py
+@@ -8,7 +8,7 @@ from dynaconf.utils import upperfy
+ from dynaconf.utils import warn_deprecations
+ from dynaconf.utils.files import find_file
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import load_dotenv
++from dotenv import load_dotenv
+ 
+ 
+ def try_renamed(key, value, older_key, current_key):
+diff --git a/dynaconf/loaders/env_loader.py b/dynaconf/loaders/env_loader.py
+index e7b13bd..b034c8a 100644
+--- a/dynaconf/loaders/env_loader.py
++++ b/dynaconf/loaders/env_loader.py
+@@ -2,7 +2,7 @@ from os import environ
+ 
+ from dynaconf.utils import upperfy
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import cli as dotenv_cli
++from dotenv import cli as dotenv_cli
+ 
+ 
+ IDENTIFIER = "env"
+diff --git a/dynaconf/loaders/toml_loader.py b/dynaconf/loaders/toml_loader.py
+index 07b973f..d81d675 100644
+--- a/dynaconf/loaders/toml_loader.py
++++ b/dynaconf/loaders/toml_loader.py
+@@ -5,7 +5,7 @@ from dynaconf import default_settings
+ from dynaconf.constants import TOML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ def load(obj, env=None, silent=True, key=None, filename=None):
+diff --git a/dynaconf/loaders/yaml_loader.py b/dynaconf/loaders/yaml_loader.py
+index 33c6532..3ef419a 100644
+--- a/dynaconf/loaders/yaml_loader.py
++++ b/dynaconf/loaders/yaml_loader.py
+@@ -7,7 +7,7 @@ from dynaconf.constants import YAML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+ from dynaconf.utils.parse_conf import try_to_encode
+-from dynaconf.vendor.ruamel import yaml
++from ruamel import yaml
+ 
+ # Add support for Dynaconf Lazy values to YAML dumper
+ yaml.SafeDumper.yaml_representers[
+diff --git a/dynaconf/utils/parse_conf.py b/dynaconf/utils/parse_conf.py
+index 5fc8234..6509c35 100644
+--- a/dynaconf/utils/parse_conf.py
++++ b/dynaconf/utils/parse_conf.py
+@@ -8,7 +8,7 @@ from dynaconf.utils import extract_json_objects
+ from dynaconf.utils import multi_replace
+ from dynaconf.utils import recursively_evaluate_lazy_format
+ from dynaconf.utils.boxing import DynaBox
+-from dynaconf.vendor import toml
++import toml
+ 
+ try:
+     from jinja2 import Environment
+diff --git a/dynaconf/vendor/box/converters.py b/dynaconf/vendor/box/converters.py
+index 93cdcfb..c81877a 100644
+--- a/dynaconf/vendor/box/converters.py
++++ b/dynaconf/vendor/box/converters.py
+@@ -7,9 +7,9 @@ _B='utf-8'
+ _A=None
+ import csv,json,sys,warnings
+ from pathlib import Path
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError,BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ BOX_PARAMETERS='default_box','default_box_attr','conversion_box','frozen_box','camel_killer_box','box_safe_prefix','box_duplicates','ordered_box','default_box_none_transform','box_dots','modify_tuples_box','box_intact_types','box_recast'
+ def _exists(filename,create=_E):
+ 	A=filename;B=Path(A)
+@@ -75,4 +75,4 @@ def _to_csv(box_list,filename,encoding=_B,errors=_C):
+ 			for G in A:D.writerow(G)
+ def _from_csv(filename,encoding=_B,errors=_C):
+ 	A=filename;_exists(A)
+-	with open(A,_G,encoding=encoding,errors=errors,newline='')as B:C=csv.DictReader(B);return[A for A in C]
+\ No newline at end of file
++	with open(A,_G,encoding=encoding,errors=errors,newline='')as B:C=csv.DictReader(B);return[A for A in C]
+diff --git a/dynaconf/vendor/box/from_file.py b/dynaconf/vendor/box/from_file.py
+index daa1137..4a2739d 100644
+--- a/dynaconf/vendor/box/from_file.py
++++ b/dynaconf/vendor/box/from_file.py
+@@ -1,8 +1,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ from .exceptions import BoxError
+ from .box import Box
+ from .box_list import BoxList
+@@ -31,4 +31,4 @@ def box_from_file(file,file_type=None,encoding='utf-8',errors='strict'):
+ 	if A.suffix in('.json','.jsn'):return _to_json(B)
+ 	if A.suffix in('.yaml','.yml'):return _to_yaml(B)
+ 	if A.suffix in('.tml','.toml'):return _to_toml(B)
+-	raise BoxError(f"Could not determine file type based off extension, please provide file_type")
+\ No newline at end of file
++	raise BoxError(f"Could not determine file type based off extension, please provide file_type")
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index 9338851..726b009 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -11,7 +11,7 @@ from dynaconf.cli import main
+ from dynaconf.cli import read_file_in_root_directory
+ from dynaconf.cli import WRITERS
+ from dynaconf.utils.files import read_file
+-from dynaconf.vendor.click.testing import CliRunner
++from click.testing import CliRunner
+ 
+ 
+ runner = CliRunner()
+
+base-commit: 952e713353356ea701196ac5ad204c72fd097e58
+-- 
+2.32.0
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index afece6381c..e938d27444 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -137,6 +137,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dbm)
+  #:use-module (gnu packages django)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages docker)
   #:use-module (gnu packages enchant)
@@ -12448,6 +12449,16 @@ text.")
    (home-page "https://pypi.org/project/colorama/")
    (license license:bsd-3)))
 
+(define-public python-colorama-0.4.1
+  (package (inherit python-colorama)
+    (version "0.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "colorama" version))
+       (sha256
+        (base32 "0ba247bx5pc60hcpbf3rjsqk0whilg241i9qdfnlcwij5qgdgvh5"))))))
+
 (define-public python2-colorama
   (package-with-python2 python-colorama))
 
@@ -26350,6 +26361,18 @@ graph can be output for rendering by GraphViz or yEd.")
 read key-value pairs from a .env file and set them as environment variables")
     (license license:bsd-3)))
 
+(define-public python-dotenv-0.13.0
+  (package (inherit python-dotenv)
+    (name "python-dotenv")
+    (version "0.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
+
 (define-public python-box
   (package
     (name "python-box")
@@ -26373,3 +26396,74 @@ read key-value pairs from a .env file and set them as environment variables")
      "This package provides the @code{python-box} Python module.
 It implements advanced Python dictionaries with dot notation access.")
     (license license:expat)))
+
+(define-public dynaconf
+  (package
+    (name "dynaconf")
+    (version "3.1.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/rochacbruno/dynaconf")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0dafd7hb691g6s3yjfvl5gph5md73n6g9j44kjpbnbbilr5pc85g"))
+       (patches (search-patches "dynaconf-Unvendor-dependencies.patch"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Remove vendored dependencies
+                   (let ((unvendor '("click" "dotenv" "ruamel" "toml")))
+                     (with-directory-excursion "dynaconf/vendor"
+                       (for-each delete-file-recursively unvendor))
+                     (with-directory-excursion "dynaconf/vendor_src"
+                       (for-each delete-file-recursively unvendor)))))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? outputs #:allow-other-keys)
+             (when tests?
+               (setenv "PATH"
+                       (string-append (assoc-ref outputs "out") "/bin:"
+                                      (getenv "PATH")))
+               ;; These tests depend on hvac and a
+               ;; live Vault process.
+               (delete-file "tests/test_vault.py")
+               (invoke "make" "test_only"))
+             #t)))))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-dotenv" ,python-dotenv-0.13.0)
+       ("python-ruamel.yaml" ,python-ruamel.yaml)
+       ("python-toml" ,python-toml)))
+    (native-inputs
+     `(("make" ,gnu-make)
+       ("python-codecov" ,python-codecov)
+       ("python-configobj" ,python-configobj)
+       ("python-colorama" ,python-colorama-0.4.1)
+       ("python-django" ,python-django)
+       ("python-flake8" ,python-flake8)
+       ("python-flake8-print" ,python-flake8-print)
+       ("python-flake8-todo" ,python-flake8-todo)
+       ("python-flask" ,python-flask)
+       ("python-future" ,python-future)
+       ("python-pep8-naming" ,python-pep8-naming)
+       ("python-pytest" ,python-pytest-6)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-forked" ,python-pytest-forked)
+       ("python-pytest-mock" ,python-pytest-mock)
+       ("python-pytest-xdist" ,python-pytest-xdist)
+       ("python-radon" ,python-radon)))
+    (home-page
+     "https://github.com/rochacbruno/dynaconf")
+    (synopsis
+     "The dynamic configurator for your Python Project")
+    (description
+     "This package provides @code{dynaconf} the dynamic configurator for
+your Python Project.")
+    (license license:expat)))
-- 
2.33.0
S
S
Sarah Morgensen wrote on 29 Aug 2021 00:46
Re: [bug#49834] Add dynaconf
(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)(address . 49834@debbugs.gnu.org)
86a6l12nnt.fsf@mgsn.dev
Hi Giacomo,

Giacomo Leidi <goodoldpaul@autistici.org> writes:

Toggle quote (4 lines)
> Dear Sarah,
>
> thank you for your review!

Thank you for your continued work on this. I know it can be a long and
sometimes discouraging process, and we often end up with abandoned
patches because of it.

Toggle quote (10 lines)
>
> On 8/4/21 8:26 PM, Sarah Morgensen wrote:
>> The pyproject.toml file does say this is "MIT" (= expat), but there's no
>> actual license file in the project. I don't think this is sufficient as
>> far as Guix is concerned (perhaps an actual maintainer/committer can
>> comment?)
>
> First of all I opened an upstream PR [0] to add an actual LICENSE file: I hope
> that, given its simplicity, it will get merged soon.

Fingers crossed!

Toggle quote (13 lines)
>
> I'm no expert about this but I tried building dynaconf without flake8-debugger
> and it seems to work flawlessly. The dependency was put there by the python
> importer, probably the developers have it in some dev-dependencies declaration
> needed to commit well-formatted code in the repository.
>
> Since flake8-debugger doesn't appear to be required for the inclusion of
> dynaconf maybe we can exclude it for this time and whenever the PR will
> be merged I'll open another Guix issue to add it.
>
> What do you think about this approach? (I'm attaching an updated patch-set
> without flake8-debugger and rebased on current master).

Did you receive my other email? I found that in fact none of the flake8
packages, as well as some others, are actually required. I apologise if
merging these bugs caused it to get lost! I'll quote it below.

Sarah Morgensen <iskarian@mgsn.dev> writes:

Toggle quote (133 lines)
> Hi,
>
> Thanks again for your work on packaging this!
>
> Giacomo Leidi <goodoldpaul@autistici.org> writes:
>
>> * gnu/packages/python-xyz.scm (python-colorama-0.4.1): New variable,
>> (python-dotenv-0.13.0): New variable,
>> (dynaconf): New variable.
>
> Packages typically get one commit per package (so this would be three
> commits).
>
>> * gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
> ^ an extra space slipped in here.
>
>> [...]
>> + (arguments
>> + `(#:phases
>> + (modify-phases %standard-phases
>> + (replace 'check
>> + (lambda* (#:key tests? outputs #:allow-other-keys)
>> + (when tests?
>> + (setenv "PATH"
>> + (string-append (assoc-ref outputs "out") "/bin:"
>> + (getenv "PATH")))
>> + ;; These tests depend on hvac and a
>> + ;; live Vault process.
>> + (delete-file "tests/test_vault.py")
>> + (invoke "make" "test_only"))
>> + #t)))))
> ^ Nitpick: phases no longer have to end in #t, though it
> doesn't hurt.
>
>> + (propagated-inputs
>> + `(("python-click" ,python-click)
>> + ("python-dotenv" ,python-dotenv-0.13.0)
>> + ("python-ruamel.yaml" ,python-ruamel.yaml)
>> + ("python-toml" ,python-toml)))
>> + (native-inputs
>> + `(("make" ,gnu-make)
>> + ("python-codecov" ,python-codecov)
>> + ("python-configobj" ,python-configobj)
>> + ("python-colorama" ,python-colorama-0.4.1)
>> + ("python-django" ,python-django)
>> + ("python-flake8" ,python-flake8)
>> + ("python-flake8-debugger" ,python-flake8-debugger)
>> + ("python-flake8-print" ,python-flake8-print)
>> + ("python-flake8-todo" ,python-flake8-todo)
>> + ("python-flask" ,python-flask)
>> + ("python-future" ,python-future)
>> + ("python-pep8-naming" ,python-pep8-naming)
>> + ("python-pytest" ,python-pytest-6)
>> + ("python-pytest-cov" ,python-pytest-cov)
>> + ("python-pytest-forked" ,python-pytest-forked)
>> + ("python-pytest-mock" ,python-pytest-mock)
>> + ("python-pytest-xdist" ,python-pytest-xdist)
>> + ("python-radon" ,python-radon)))
>
> With the test_only target, I think only a few of these are actually
> required. Also, configobj should probably be a propagated input as
> dynaconf uses it for ini files. I've attached a patch below.
>
> Notably, this seems to make python-flake8-debugger, python-flake8-todo,
> python-pep8-naming and python-colorama-0.4.1 unneccessary (I think
> because they are used for code linting, and the test_only target doesn't
> do linting). WDYT?
>
> (Even if they aren't necessary for packaging dynaconf, you're still
> welcome to send them as separate patches :)
>
>> + (home-page
>> + "https://github.com/rochacbruno/dynaconf")
> ^ Nitpick: this can go on one line
>
>> + (synopsis
>> + "The dynamic configurator for your Python Project")
> ^ Likewise
>
>> + (description
>> + "This package provides @code{dynaconf} the dynamic configurator for
>> +your Python Project.")
>
> Even as someone who has used python a lot before, this doesn't tell me
> anything about what dynaconf actually does or why I might want to
> install it. (Or, is it even an end-user package?) For examples, take a
> look at pretty much any package which has more than two lines in its
> description (like, say, python-seaborn). I know writing a good
> description can be difficult, but they tend to stick around and read by
> lots of people, so getting it right the first time is important!
>
>
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index f4f3b7fb3f..58defd9fcc 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26380,28 +26380,16 @@ It implements advanced Python dictionaries with dot notation access.")
> #t)))))
> (propagated-inputs
> `(("python-click" ,python-click)
> + ("python-configobj" ,python-configobj)
> ("python-dotenv" ,python-dotenv-0.13.0)
> ("python-ruamel.yaml" ,python-ruamel.yaml)
> ("python-toml" ,python-toml)))
> (native-inputs
> - `(("make" ,gnu-make)
> - ("python-codecov" ,python-codecov)
> - ("python-configobj" ,python-configobj)
> - ("python-colorama" ,python-colorama-0.4.1)
> - ("python-django" ,python-django)
> - ("python-flake8" ,python-flake8)
> - ("python-flake8-debugger" ,python-flake8-debugger)
> - ("python-flake8-print" ,python-flake8-print)
> - ("python-flake8-todo" ,python-flake8-todo)
> + `(("python-django" ,python-django)
> ("python-flask" ,python-flask)
> - ("python-future" ,python-future)
> - ("python-pep8-naming" ,python-pep8-naming)
> ("python-pytest" ,python-pytest-6)
> ("python-pytest-cov" ,python-pytest-cov)
> - ("python-pytest-forked" ,python-pytest-forked)
> - ("python-pytest-mock" ,python-pytest-mock)
> - ("python-pytest-xdist" ,python-pytest-xdist)
> - ("python-radon" ,python-radon)))
> + ("python-pytest-mock" ,python-pytest-mock)))
> (home-page
> "https://github.com/rochacbruno/dynaconf")
> (synopsis
>
>
> --
> Sarah
P
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)(address . 49834@debbugs.gnu.org)
81dc5a57-e02a-4701-eb52-37eb378d7fcc@autistici.org
Dear Sarah,

On 8/29/21 12:46 AM, Sarah Morgensen wrote:
Toggle quote (3 lines)
> Did you receive my other email? I found that in fact none of the flake8
> packages, as well as some others, are actually required. I apologise if
> merging these bugs caused it to get lost! I'll quote it below.
No I did not :( . Also I'm sorry about the confusion with the multiple
bug reports, I forgot to send the patches directly to the ticket address.
Toggle quote (5 lines)
> * gnu/packages/python-xyz.scm (python-colorama-0.4.1): New variable,
> (python-dotenv-0.13.0): New variable,
> (dynaconf): New variable.
>> Packages typically get one commit per package (so this would be three
>> commits).
I wasn't sure about this because right now those exact versions are only
needed by dynaconf. Anyway I divided them in three commits.
Toggle quote (20 lines)
>>> * gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
>> ^ an extra space slipped in here.
>>
>>> [...]
>>> + (arguments
>>> + `(#:phases
>>> + (modify-phases %standard-phases
>>> + (replace 'check
>>> + (lambda* (#:key tests? outputs #:allow-other-keys)
>>> + (when tests?
>>> + (setenv "PATH"
>>> + (string-append (assoc-ref outputs "out") "/bin:"
>>> + (getenv "PATH")))
>>> + ;; These tests depend on hvac and a
>>> + ;; live Vault process.
>>> + (delete-file "tests/test_vault.py")
>>> + (invoke "make" "test_only"))
>>> + #t)))))
>> ^ Nitpick: phases no longer have to end in #t, though it
>> doesn't hurt.
Thank you I didn't know it, fixed!
Toggle quote (36 lines)
>>
>>> + (propagated-inputs
>>> + `(("python-click" ,python-click)
>>> + ("python-dotenv" ,python-dotenv-0.13.0)
>>> + ("python-ruamel.yaml" ,python-ruamel.yaml)
>>> + ("python-toml" ,python-toml)))
>>> + (native-inputs
>>> + `(("make" ,gnu-make)
>>> + ("python-codecov" ,python-codecov)
>>> + ("python-configobj" ,python-configobj)
>>> + ("python-colorama" ,python-colorama-0.4.1)
>>> + ("python-django" ,python-django)
>>> + ("python-flake8" ,python-flake8)
>>> + ("python-flake8-debugger" ,python-flake8-debugger)
>>> + ("python-flake8-print" ,python-flake8-print)
>>> + ("python-flake8-todo" ,python-flake8-todo)
>>> + ("python-flask" ,python-flask)
>>> + ("python-future" ,python-future)
>>> + ("python-pep8-naming" ,python-pep8-naming)
>>> + ("python-pytest" ,python-pytest-6)
>>> + ("python-pytest-cov" ,python-pytest-cov)
>>> + ("python-pytest-forked" ,python-pytest-forked)
>>> + ("python-pytest-mock" ,python-pytest-mock)
>>> + ("python-pytest-xdist" ,python-pytest-xdist)
>>> + ("python-radon" ,python-radon)))
>> With the test_only target, I think only a few of these are actually
>> required. Also, configobj should probably be a propagated input as
>> dynaconf uses it for ini files. I've attached a patch below.
>>
>> Notably, this seems to make python-flake8-debugger, python-flake8-todo,
>> python-pep8-naming and python-colorama-0.4.1 unneccessary (I think
>> because they are used for code linting, and the test_only target doesn't
>> do linting). WDYT?
>>
>> (Even if they aren't necessary for packaging dynaconf, you're still
>> welcome to send them as separate patches :)
I definitely agree, I'll send them as separate patches.
Toggle quote (20 lines)
>>
>>> + (home-page
>>> + "https://github.com/rochacbruno/dynaconf")
>> ^ Nitpick: this can go on one line
>>
>>> + (synopsis
>>> + "The dynamic configurator for your Python Project")
>> ^ Likewise
>>
>>> + (description
>>> + "This package provides @code{dynaconf} the dynamic configurator for
>>> +your Python Project.")
>> Even as someone who has used python a lot before, this doesn't tell me
>> anything about what dynaconf actually does or why I might want to
>> install it. (Or, is it even an end-user package?) For examples, take a
>> look at pretty much any package which has more than two lines in its
>> description (like, say, python-seaborn). I know writing a good
>> description can be difficult, but they tend to stick around and read by
>> lots of people, so getting it right the first time is important!

I updated the description with the feature set provided on the main
website, it should be a little more clear now .


I'm sending an updated patchset, thank you for your time :)


Giacomo
G
G
Giacomo Leidi wrote on 30 Aug 2021 00:53
[PATCH 2/4] gnu: python-ruamel.yaml: Update to 0.17.10.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210829225317.32435-2-goodoldpaul@autistici.org
* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10.
---
gnu/packages/serialization.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 0e79b7c89c..b8f21f2375 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -532,14 +532,14 @@ it is comparable to protobuf.")
 (define-public python-ruamel.yaml
   (package
     (name "python-ruamel.yaml")
-    (version "0.15.83")
+    (version "0.17.10")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ruamel.yaml" version))
        (sha256
         (base32
-         "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw"))))
+         "0rwywdbmy20qwssccydpaval2vq36825fiva374zf3vavkbchsqh"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-- 
2.33.0
G
G
Giacomo Leidi wrote on 30 Aug 2021 00:53
[PATCH 1/4] gnu: Add python-dotenv.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210829225317.32435-1-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-dotenv): New variable.
---
gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1d1a679133..3addb3c46a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26435,3 +26435,30 @@ a (rather superficial) static analysis, and constructs a directed graph of the
 objects in the combined source, and how they define or use each other.  The
 graph can be output for rendering by GraphViz or yEd.")
     (license license:gpl2)))
+
+(define-public python-dotenv
+  (package
+    (name "python-dotenv")
+    (version "0.19.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0wk1kfzbpqk9swvmpa9z3q170ffqql2id4b2dxrkrq58r4mbq8gm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
+       ("python-sh" ,python-sh)))
+    (home-page
+     "https://github.com/theskumar/python-dotenv")
+    (synopsis
+     "Setup environment variables according to .env files")
+    (description
+     "This package provides the @code{python-dotenv} Python module to
+read key-value pairs from a .env file and set them as environment variables")
+    (license license:bsd-3)))

base-commit: 994d8ce394e88b55985241b7b14f6a8459bcf9e8
-- 
2.33.0
G
G
Giacomo Leidi wrote on 30 Aug 2021 00:53
[PATCH 3/4] gnu: Add python-dotenv-0.13.0.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210829225317.32435-3-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-dotenv-0.13.0): New variable.
---
gnu/packages/python-xyz.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3addb3c46a..b98136d992 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26462,3 +26462,15 @@ graph can be output for rendering by GraphViz or yEd.")
      "This package provides the @code{python-dotenv} Python module to
 read key-value pairs from a .env file and set them as environment variables")
     (license license:bsd-3)))
+
+(define-public python-dotenv-0.13.0
+  (package (inherit python-dotenv)
+    (name "python-dotenv")
+    (version "0.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
-- 
2.33.0
G
G
Giacomo Leidi wrote on 30 Aug 2021 00:53
[PATCH 4/4] gnu: Add dynaconf.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210829225317.32435-4-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (dynaconf): New variable.
* gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
* local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
.../dynaconf-Unvendor-dependencies.patch | 180 ++++++++++++++++++
gnu/packages/python-xyz.scm | 73 +++++++
3 files changed, 254 insertions(+)
create mode 100644 gnu/packages/patches/dynaconf-Unvendor-dependencies.patch

Toggle diff (288 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a0da1a96d8..63fc46c740 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -977,6 +977,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
   %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch	\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
+  %D%/packages/patches/dynaconf-Unvendor-dependencies.patch 	\
   %D%/packages/patches/ecl-16-format-directive-limit.patch	\
   %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch	\
   %D%/packages/patches/ecl-16-libffi.patch			\
diff --git a/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
new file mode 100644
index 0000000000..a379b1f00c
--- /dev/null
+++ b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
@@ -0,0 +1,180 @@
+From 3f7b48195500cbbbbecd3cac2f5308c64004479b Mon Sep 17 00:00:00 2001
+From: Giacomo Leidi <goodoldpaul@autistici.org>
+Date: Sun, 29 Aug 2021 23:39:27 +0200
+Subject: [PATCH] Use system site dependencies.
+
+Box was not unvendored because it appears to be heavily patched.
+---
+ dynaconf/cli.py                       | 4 ++--
+ dynaconf/default_settings.py          | 2 +-
+ dynaconf/loaders/env_loader.py        | 2 +-
+ dynaconf/loaders/toml_loader.py       | 2 +-
+ dynaconf/loaders/yaml_loader.py       | 2 +-
+ dynaconf/utils/parse_conf.py          | 2 +-
+ dynaconf/vendor/box/converters.py     | 4 ++--
+ dynaconf/vendor/box/from_file.py      | 4 ++--
+ dynaconf/vendor_src/box/converters.py | 4 ++--
+ dynaconf/vendor_src/box/from_file.py  | 4 ++--
+ tests/test_cli.py                     | 2 +-
+ 11 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/dynaconf/cli.py b/dynaconf/cli.py
+index 5bb8316..1341a95 100644
+--- a/dynaconf/cli.py
++++ b/dynaconf/cli.py
+@@ -20,8 +20,8 @@ from dynaconf.utils.functional import empty
+ from dynaconf.utils.parse_conf import parse_conf_data
+ from dynaconf.validator import ValidationError
+ from dynaconf.validator import Validator
+-from dynaconf.vendor import click
+-from dynaconf.vendor import toml
++import click
++import toml
+ 
+ 
+ CWD = Path.cwd()
+diff --git a/dynaconf/default_settings.py b/dynaconf/default_settings.py
+index 66601b0..9605fc5 100644
+--- a/dynaconf/default_settings.py
++++ b/dynaconf/default_settings.py
+@@ -8,7 +8,7 @@ from dynaconf.utils import upperfy
+ from dynaconf.utils import warn_deprecations
+ from dynaconf.utils.files import find_file
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import load_dotenv
++from dotenv import load_dotenv
+ 
+ 
+ def try_renamed(key, value, older_key, current_key):
+diff --git a/dynaconf/loaders/env_loader.py b/dynaconf/loaders/env_loader.py
+index e7b13bd..b034c8a 100644
+--- a/dynaconf/loaders/env_loader.py
++++ b/dynaconf/loaders/env_loader.py
+@@ -2,7 +2,7 @@ from os import environ
+ 
+ from dynaconf.utils import upperfy
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import cli as dotenv_cli
++from dotenv import cli as dotenv_cli
+ 
+ 
+ IDENTIFIER = "env"
+diff --git a/dynaconf/loaders/toml_loader.py b/dynaconf/loaders/toml_loader.py
+index 07b973f..d81d675 100644
+--- a/dynaconf/loaders/toml_loader.py
++++ b/dynaconf/loaders/toml_loader.py
+@@ -5,7 +5,7 @@ from dynaconf import default_settings
+ from dynaconf.constants import TOML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ def load(obj, env=None, silent=True, key=None, filename=None):
+diff --git a/dynaconf/loaders/yaml_loader.py b/dynaconf/loaders/yaml_loader.py
+index 33c6532..3ef419a 100644
+--- a/dynaconf/loaders/yaml_loader.py
++++ b/dynaconf/loaders/yaml_loader.py
+@@ -7,7 +7,7 @@ from dynaconf.constants import YAML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+ from dynaconf.utils.parse_conf import try_to_encode
+-from dynaconf.vendor.ruamel import yaml
++from ruamel import yaml
+ 
+ # Add support for Dynaconf Lazy values to YAML dumper
+ yaml.SafeDumper.yaml_representers[
+diff --git a/dynaconf/utils/parse_conf.py b/dynaconf/utils/parse_conf.py
+index c42b07a..01ccdae 100644
+--- a/dynaconf/utils/parse_conf.py
++++ b/dynaconf/utils/parse_conf.py
+@@ -9,7 +9,7 @@ from dynaconf.utils import isnamedtupleinstance
+ from dynaconf.utils import multi_replace
+ from dynaconf.utils import recursively_evaluate_lazy_format
+ from dynaconf.utils.boxing import DynaBox
+-from dynaconf.vendor import toml
++import toml
+ 
+ try:
+     from jinja2 import Environment
+diff --git a/dynaconf/vendor/box/converters.py b/dynaconf/vendor/box/converters.py
+index 93cdcfb..e34c7dc 100644
+--- a/dynaconf/vendor/box/converters.py
++++ b/dynaconf/vendor/box/converters.py
+@@ -7,9 +7,9 @@ _B='utf-8'
+ _A=None
+ import csv,json,sys,warnings
+ from pathlib import Path
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError,BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ BOX_PARAMETERS='default_box','default_box_attr','conversion_box','frozen_box','camel_killer_box','box_safe_prefix','box_duplicates','ordered_box','default_box_none_transform','box_dots','modify_tuples_box','box_intact_types','box_recast'
+ def _exists(filename,create=_E):
+ 	A=filename;B=Path(A)
+diff --git a/dynaconf/vendor/box/from_file.py b/dynaconf/vendor/box/from_file.py
+index daa1137..d75940b 100644
+--- a/dynaconf/vendor/box/from_file.py
++++ b/dynaconf/vendor/box/from_file.py
+@@ -1,8 +1,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ from .exceptions import BoxError
+ from .box import Box
+ from .box_list import BoxList
+diff --git a/dynaconf/vendor_src/box/converters.py b/dynaconf/vendor_src/box/converters.py
+index c9a2293..ae42bf6 100644
+--- a/dynaconf/vendor_src/box/converters.py
++++ b/dynaconf/vendor_src/box/converters.py
+@@ -9,9 +9,9 @@ import sys
+ import warnings
+ from pathlib import Path
+ 
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError, BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ BOX_PARAMETERS = ('default_box', 'default_box_attr', 'conversion_box',
+diff --git a/dynaconf/vendor_src/box/from_file.py b/dynaconf/vendor_src/box/from_file.py
+index 2e2a6ad..3f76819 100644
+--- a/dynaconf/vendor_src/box/from_file.py
++++ b/dynaconf/vendor_src/box/from_file.py
+@@ -3,8 +3,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ 
+ 
+ from .exceptions import BoxError
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index 6693701..df44409 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -11,7 +11,7 @@ from dynaconf.cli import main
+ from dynaconf.cli import read_file_in_root_directory
+ from dynaconf.cli import WRITERS
+ from dynaconf.utils.files import read_file
+-from dynaconf.vendor.click.testing import CliRunner
++from click.testing import CliRunner
+ 
+ 
+ runner = CliRunner()
+
+base-commit: ebf7b17cffd5e08b212948bd8036d580718d5bf8
+-- 
+2.32.0
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b98136d992..c6cce0645c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -137,6 +137,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dbm)
+  #:use-module (gnu packages django)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages docker)
   #:use-module (gnu packages enchant)
@@ -26474,3 +26475,75 @@ read key-value pairs from a .env file and set them as environment variables")
        (sha256
         (base32
          "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
+
+(define-public dynaconf
+  (package
+    (name "dynaconf")
+    (version "3.1.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/rochacbruno/dynaconf")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0hxp1iadwmva79l16frvc77jrisppb09z6k1asm0qfjjzwyaswg3"))
+       (patches (search-patches "dynaconf-Unvendor-dependencies.patch"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Remove vendored dependencies
+                   (let ((unvendor '("click" "dotenv" "ruamel" "toml")))
+                     (with-directory-excursion "dynaconf/vendor"
+                       (for-each delete-file-recursively unvendor))
+                     (with-directory-excursion "dynaconf/vendor_src"
+                       (for-each delete-file-recursively unvendor)))))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? outputs #:allow-other-keys)
+             (when tests?
+               (setenv "PATH"
+                       (string-append (assoc-ref outputs "out") "/bin:"
+                                      (getenv "PATH")))
+               ;; These tests depend on hvac and a
+               ;; live Vault process.
+               (delete-file "tests/test_vault.py")
+               (invoke "make" "test_only")))))))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-configobj" ,python-configobj)
+       ("python-dotenv" ,python-dotenv-0.13.0)
+       ("python-ruamel.yaml" ,python-ruamel.yaml)
+       ("python-toml" ,python-toml)))
+    (native-inputs
+     `(("python-django" ,python-django)
+       ("python-flask" ,python-flask)
+       ("python-pytest" ,python-pytest-6)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-mock" ,python-pytest-mock)))
+    (home-page "https://www.dynaconf.com/")
+    (synopsis "The dynamic configurator for your Python project")
+    (description
+     "This package provides @code{dynaconf} the dynamic configurator manager for
+your Python project.  It provides features such as:
+
+@itemize
+@item Inspired by the @url{https://12factor.net/config, 12-factor application guide};
+@item Settings management (default values, validation, parsing, templating);
+@item Protection of sensitive information (passwords/tokens);
+@item Multiple file formats @code{toml|yaml|json|ini|py} and also customizable
+loaders;
+@item Full support for environment variables to override existing settings
+(dotenv support included);
+@item Optional layered system for multiple environments @code{[default,
+development, testing, production]};
+@item Built-in support for Hashicorp Vault and Redis as settings and secrets storage;
+@item Built-in extensions for Django and Flask web frameworks;
+@item CLI for common operations such as @code{init, list, write, validate, export}.
+@end itemize")
+    (license license:expat)))
-- 
2.33.0
P
[PATCH 1/7] gnu: Add python-flake8-debugger.
(address . 49834@debbugs.gnu.org)
da46c6fe-b6e6-76ce-1e46-38c6473cb1cf@autistici.org
Dear guixers,

this is a friendly ping :) . I'm attaching the patch set rebased on
current master.

Thank you for your time,


paul
From 4a85671eb566603b37a63b7c3c365d7474974df4 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Mon, 30 Aug 2021 00:19:23 +0200
Subject: [PATCH 1/4] gnu: Add python-dotenv.

* gnu/packages/python-xyz.scm (python-dotenv): New variable.
---
gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fa4b11511a..d4f4dc1a7c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26937,6 +26937,33 @@ objects in the combined source, and how they define or use each other.  The
 graph can be output for rendering by GraphViz or yEd.")
     (license license:gpl2)))
 
+(define-public python-dotenv
+  (package
+    (name "python-dotenv")
+    (version "0.19.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0wk1kfzbpqk9swvmpa9z3q170ffqql2id4b2dxrkrq58r4mbq8gm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
+       ("python-sh" ,python-sh)))
+    (home-page
+     "https://github.com/theskumar/python-dotenv")
+    (synopsis
+     "Setup environment variables according to .env files")
+    (description
+     "This package provides the @code{python-dotenv} Python module to
+read key-value pairs from a .env file and set them as environment variables")
+    (license license:bsd-3)))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))

base-commit: 34baab7a7b66610b592a1e5703470c75a1e06c7f
-- 
2.33.0
From 2f4488be2881a5db9921f5d847ab088d4095886b Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Tue, 29 Jun 2021 22:29:43 +0200
Subject: [PATCH 2/4] gnu: python-ruamel.yaml: Update to 0.17.10.

* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10.
---
gnu/packages/serialization.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 196141ace8..e6b95ebf53 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -519,14 +519,14 @@ it is comparable to protobuf.")
 (define-public python-ruamel.yaml
   (package
     (name "python-ruamel.yaml")
-    (version "0.15.83")
+    (version "0.17.10")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ruamel.yaml" version))
        (sha256
         (base32
-         "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw"))))
+         "0rwywdbmy20qwssccydpaval2vq36825fiva374zf3vavkbchsqh"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-- 
2.33.0
From 736d84af3b33e76839919c7b66536fe80b34b3f0 Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Sun, 29 Aug 2021 23:05:27 +0200
Subject: [PATCH 3/4] gnu: Add python-dotenv-0.13.0.

* gnu/packages/python-xyz.scm (python-dotenv-0.13.0): New variable.
---
gnu/packages/python-xyz.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (25 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d4f4dc1a7c..6157913e09 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26964,6 +26964,18 @@ graph can be output for rendering by GraphViz or yEd.")
 read key-value pairs from a .env file and set them as environment variables")
     (license license:bsd-3)))
 
+(define-public python-dotenv-0.13.0
+  (package (inherit python-dotenv)
+    (name "python-dotenv")
+    (version "0.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
-- 
2.33.0
From b52c89dd7599e19b8e6830f9bad313cfad07ac7f Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <goodoldpaul@autistici.org>
Date: Mon, 30 Aug 2021 00:23:27 +0200
Subject: [PATCH 4/4] gnu: Add dynaconf.

* gnu/packages/python-xyz.scm (dynaconf): New variable.
* gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
* local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
.../dynaconf-Unvendor-dependencies.patch | 180 ++++++++++++++++++
gnu/packages/python-xyz.scm | 75 +++++++-
3 files changed, 255 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/dynaconf-Unvendor-dependencies.patch

Toggle diff (297 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 91915e780b..f85435600f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -990,6 +990,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
   %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch	\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
+  %D%/packages/patches/dynaconf-Unvendor-dependencies.patch 	\
   %D%/packages/patches/ecl-16-format-directive-limit.patch	\
   %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch	\
   %D%/packages/patches/ecl-16-libffi.patch			\
diff --git a/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
new file mode 100644
index 0000000000..a379b1f00c
--- /dev/null
+++ b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
@@ -0,0 +1,180 @@
+From 3f7b48195500cbbbbecd3cac2f5308c64004479b Mon Sep 17 00:00:00 2001
+From: Giacomo Leidi <goodoldpaul@autistici.org>
+Date: Sun, 29 Aug 2021 23:39:27 +0200
+Subject: [PATCH] Use system site dependencies.
+
+Box was not unvendored because it appears to be heavily patched.
+---
+ dynaconf/cli.py                       | 4 ++--
+ dynaconf/default_settings.py          | 2 +-
+ dynaconf/loaders/env_loader.py        | 2 +-
+ dynaconf/loaders/toml_loader.py       | 2 +-
+ dynaconf/loaders/yaml_loader.py       | 2 +-
+ dynaconf/utils/parse_conf.py          | 2 +-
+ dynaconf/vendor/box/converters.py     | 4 ++--
+ dynaconf/vendor/box/from_file.py      | 4 ++--
+ dynaconf/vendor_src/box/converters.py | 4 ++--
+ dynaconf/vendor_src/box/from_file.py  | 4 ++--
+ tests/test_cli.py                     | 2 +-
+ 11 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/dynaconf/cli.py b/dynaconf/cli.py
+index 5bb8316..1341a95 100644
+--- a/dynaconf/cli.py
++++ b/dynaconf/cli.py
+@@ -20,8 +20,8 @@ from dynaconf.utils.functional import empty
+ from dynaconf.utils.parse_conf import parse_conf_data
+ from dynaconf.validator import ValidationError
+ from dynaconf.validator import Validator
+-from dynaconf.vendor import click
+-from dynaconf.vendor import toml
++import click
++import toml
+ 
+ 
+ CWD = Path.cwd()
+diff --git a/dynaconf/default_settings.py b/dynaconf/default_settings.py
+index 66601b0..9605fc5 100644
+--- a/dynaconf/default_settings.py
++++ b/dynaconf/default_settings.py
+@@ -8,7 +8,7 @@ from dynaconf.utils import upperfy
+ from dynaconf.utils import warn_deprecations
+ from dynaconf.utils.files import find_file
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import load_dotenv
++from dotenv import load_dotenv
+ 
+ 
+ def try_renamed(key, value, older_key, current_key):
+diff --git a/dynaconf/loaders/env_loader.py b/dynaconf/loaders/env_loader.py
+index e7b13bd..b034c8a 100644
+--- a/dynaconf/loaders/env_loader.py
++++ b/dynaconf/loaders/env_loader.py
+@@ -2,7 +2,7 @@ from os import environ
+ 
+ from dynaconf.utils import upperfy
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import cli as dotenv_cli
++from dotenv import cli as dotenv_cli
+ 
+ 
+ IDENTIFIER = "env"
+diff --git a/dynaconf/loaders/toml_loader.py b/dynaconf/loaders/toml_loader.py
+index 07b973f..d81d675 100644
+--- a/dynaconf/loaders/toml_loader.py
++++ b/dynaconf/loaders/toml_loader.py
+@@ -5,7 +5,7 @@ from dynaconf import default_settings
+ from dynaconf.constants import TOML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ def load(obj, env=None, silent=True, key=None, filename=None):
+diff --git a/dynaconf/loaders/yaml_loader.py b/dynaconf/loaders/yaml_loader.py
+index 33c6532..3ef419a 100644
+--- a/dynaconf/loaders/yaml_loader.py
++++ b/dynaconf/loaders/yaml_loader.py
+@@ -7,7 +7,7 @@ from dynaconf.constants import YAML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+ from dynaconf.utils.parse_conf import try_to_encode
+-from dynaconf.vendor.ruamel import yaml
++from ruamel import yaml
+ 
+ # Add support for Dynaconf Lazy values to YAML dumper
+ yaml.SafeDumper.yaml_representers[
+diff --git a/dynaconf/utils/parse_conf.py b/dynaconf/utils/parse_conf.py
+index c42b07a..01ccdae 100644
+--- a/dynaconf/utils/parse_conf.py
++++ b/dynaconf/utils/parse_conf.py
+@@ -9,7 +9,7 @@ from dynaconf.utils import isnamedtupleinstance
+ from dynaconf.utils import multi_replace
+ from dynaconf.utils import recursively_evaluate_lazy_format
+ from dynaconf.utils.boxing import DynaBox
+-from dynaconf.vendor import toml
++import toml
+ 
+ try:
+     from jinja2 import Environment
+diff --git a/dynaconf/vendor/box/converters.py b/dynaconf/vendor/box/converters.py
+index 93cdcfb..e34c7dc 100644
+--- a/dynaconf/vendor/box/converters.py
++++ b/dynaconf/vendor/box/converters.py
+@@ -7,9 +7,9 @@ _B='utf-8'
+ _A=None
+ import csv,json,sys,warnings
+ from pathlib import Path
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError,BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ BOX_PARAMETERS='default_box','default_box_attr','conversion_box','frozen_box','camel_killer_box','box_safe_prefix','box_duplicates','ordered_box','default_box_none_transform','box_dots','modify_tuples_box','box_intact_types','box_recast'
+ def _exists(filename,create=_E):
+ 	A=filename;B=Path(A)
+diff --git a/dynaconf/vendor/box/from_file.py b/dynaconf/vendor/box/from_file.py
+index daa1137..d75940b 100644
+--- a/dynaconf/vendor/box/from_file.py
++++ b/dynaconf/vendor/box/from_file.py
+@@ -1,8 +1,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ from .exceptions import BoxError
+ from .box import Box
+ from .box_list import BoxList
+diff --git a/dynaconf/vendor_src/box/converters.py b/dynaconf/vendor_src/box/converters.py
+index c9a2293..ae42bf6 100644
+--- a/dynaconf/vendor_src/box/converters.py
++++ b/dynaconf/vendor_src/box/converters.py
+@@ -9,9 +9,9 @@ import sys
+ import warnings
+ from pathlib import Path
+ 
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError, BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ BOX_PARAMETERS = ('default_box', 'default_box_attr', 'conversion_box',
+diff --git a/dynaconf/vendor_src/box/from_file.py b/dynaconf/vendor_src/box/from_file.py
+index 2e2a6ad..3f76819 100644
+--- a/dynaconf/vendor_src/box/from_file.py
++++ b/dynaconf/vendor_src/box/from_file.py
+@@ -3,8 +3,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ 
+ 
+ from .exceptions import BoxError
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index 6693701..df44409 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -11,7 +11,7 @@ from dynaconf.cli import main
+ from dynaconf.cli import read_file_in_root_directory
+ from dynaconf.cli import WRITERS
+ from dynaconf.utils.files import read_file
+-from dynaconf.vendor.click.testing import CliRunner
++from click.testing import CliRunner
+ 
+ 
+ runner = CliRunner()
+
+base-commit: ebf7b17cffd5e08b212948bd8036d580718d5bf8
+-- 
+2.32.0
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6157913e09..5e48543f3d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -63,7 +63,7 @@
 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
-;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
@@ -138,6 +138,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages django)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages docker)
@@ -27327,3 +27328,75 @@ and powerful way to handle real-world data, featuring:
      "This package provides the @code{python-box} Python module.
 It implements advanced Python dictionaries with dot notation access.")
     (license license:expat)))
+
+(define-public dynaconf
+  (package
+    (name "dynaconf")
+    (version "3.1.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/rochacbruno/dynaconf")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0hxp1iadwmva79l16frvc77jrisppb09z6k1asm0qfjjzwyaswg3"))
+       (patches (search-patches "dynaconf-Unvendor-dependencies.patch"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Remove vendored dependencies
+                   (let ((unvendor '("click" "dotenv" "ruamel" "toml")))
+                     (with-directory-excursion "dynaconf/vendor"
+                       (for-each delete-file-recursively unvendor))
+                     (with-directory-excursion "dynaconf/vendor_src"
+                       (for-each delete-file-recursively unvendor)))))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? outputs #:allow-other-keys)
+             (when tests?
+               (setenv "PATH"
+                       (string-append (assoc-ref outputs "out") "/bin:"
+                                      (getenv "PATH")))
+               ;; These tests depend on hvac and a
+               ;; live Vault process.
+               (delete-file "tests/test_vault.py")
+               (invoke "make" "test_only")))))))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-configobj" ,python-configobj)
+       ("python-dotenv" ,python-dotenv-0.13.0)
+       ("python-ruamel.yaml" ,python-ruamel.yaml)
+       ("python-toml" ,python-toml)))
+    (native-inputs
+     `(("python-django" ,python-django)
+       ("python-flask" ,python-flask)
+       ("python-pytest" ,python-pytest-6)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-mock" ,python-pytest-mock)))
+    (home-page "https://www.dynaconf.com/")
+    (synopsis "The dynamic configurator for your Python project")
+    (description
+     "This package provides @code{dynaconf} the dynamic configurator manager for
+your Python project.  It provides features such as:
+
+@itemize
+@item Inspired by the @url{https://12factor.net/config, 12-factor application guide};
+@item Settings management (default values, validation, parsing, templating);
+@item Protection of sensitive information (passwords/tokens);
+@item Multiple file formats @code{toml|yaml|json|ini|py} and also customizable
+loaders;
+@item Full support for environment variables to override existing settings
+(dotenv support included);
+@item Optional layered system for multiple environments @code{[default,
+development, testing, production]};
+@item Built-in support for Hashicorp Vault and Redis as settings and secrets storage;
+@item Built-in extensions for Django and Flask web frameworks;
+@item CLI for common operations such as @code{init, list, write, validate, export}.
+@end itemize")
+    (license license:expat)))
-- 
2.33.0
P
gnu: Add dynaconf.
(address . 49834@debbugs.gnu.org)
8f60fb97-d7d9-e72f-4b5c-ec9df20f77e4@autistici.org
Dear guixers,

 I'm sending a new patch set rebased on current master where I updated
dynaconf to version 3.1.7.

Thank you for your time,


paul
G
G
Giacomo Leidi wrote on 20 Nov 2021 00:41
[PATCH 1/4] gnu: Add python-dotenv.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20211119234125.2344-1-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-dotenv): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a6f8b10bf7..0ec800b9ee 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27558,6 +27558,32 @@ (define-public python-minikanren
 systems in Python.")
     (license license:bsd-3)))
 
+(define-public python-dotenv
+  (package
+    (name "python-dotenv")
+    (version "0.19.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0wk1kfzbpqk9swvmpa9z3q170ffqql2id4b2dxrkrq58r4mbq8gm"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
+       ("python-sh" ,python-sh)))
+    (home-page
+     "https://github.com/theskumar/python-dotenv")
+    (synopsis
+     "Setup environment variables according to .env files")
+    (description
+     "This package provides the @code{python-dotenv} Python module to
+read key-value pairs from a .env file and set them as environment variables")
+    (license license:bsd-3)))
 
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")

base-commit: 7cad4466533f14ec7e9d8744b26a8d5211ff39d4
-- 
2.34.0
G
G
Giacomo Leidi wrote on 20 Nov 2021 00:41
[PATCH 3/4] gnu: Add python-dotenv-0.13.0.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20211119234125.2344-3-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-dotenv-0.13.0): New variable.
---
gnu/packages/python-xyz.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (25 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0ec800b9ee..4181b47d10 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27585,6 +27585,18 @@ (define-public python-dotenv
 read key-value pairs from a .env file and set them as environment variables")
     (license license:bsd-3)))
 
+(define-public python-dotenv-0.13.0
+  (package (inherit python-dotenv)
+    (name "python-dotenv")
+    (version "0.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-dotenv" version))
+       (sha256
+        (base32
+         "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
-- 
2.34.0
G
G
Giacomo Leidi wrote on 20 Nov 2021 00:41
[PATCH 2/4] gnu: python-ruamel.yaml: Update to 0.17.10.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20211119234125.2344-2-goodoldpaul@autistici.org
* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10.
---
gnu/packages/serialization.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index e24ef973b5..a5a1dc960e 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -569,14 +569,14 @@ (define-public libbson
 (define-public python-ruamel.yaml
   (package
     (name "python-ruamel.yaml")
-    (version "0.15.83")
+    (version "0.17.10")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "ruamel.yaml" version))
        (sha256
         (base32
-         "0p4i8ad28cbbbjja8b9274irkhnphhvhap3aym6yb8xfp1d72kpw"))))
+         "0rwywdbmy20qwssccydpaval2vq36825fiva374zf3vavkbchsqh"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-- 
2.34.0
G
G
Giacomo Leidi wrote on 20 Nov 2021 00:41
[PATCH 4/4] gnu: Add dynaconf.
(address . 49834@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20211119234125.2344-4-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (dynaconf): New variable.
* gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
* local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
.../dynaconf-Unvendor-dependencies.patch | 180 ++++++++++++++++++
gnu/packages/python-xyz.scm | 75 +++++++-
3 files changed, 255 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/dynaconf-Unvendor-dependencies.patch

Toggle diff (297 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7cc06c8212..ab05667bc0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -994,6 +994,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
   %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch	\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
+  %D%/packages/patches/dynaconf-Unvendor-dependencies.patch 	\
   %D%/packages/patches/ecl-16-format-directive-limit.patch	\
   %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch	\
   %D%/packages/patches/ecl-16-libffi.patch			\
diff --git a/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
new file mode 100644
index 0000000000..a379b1f00c
--- /dev/null
+++ b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
@@ -0,0 +1,180 @@
+From 3f7b48195500cbbbbecd3cac2f5308c64004479b Mon Sep 17 00:00:00 2001
+From: Giacomo Leidi <goodoldpaul@autistici.org>
+Date: Sun, 29 Aug 2021 23:39:27 +0200
+Subject: [PATCH] Use system site dependencies.
+
+Box was not unvendored because it appears to be heavily patched.
+---
+ dynaconf/cli.py                       | 4 ++--
+ dynaconf/default_settings.py          | 2 +-
+ dynaconf/loaders/env_loader.py        | 2 +-
+ dynaconf/loaders/toml_loader.py       | 2 +-
+ dynaconf/loaders/yaml_loader.py       | 2 +-
+ dynaconf/utils/parse_conf.py          | 2 +-
+ dynaconf/vendor/box/converters.py     | 4 ++--
+ dynaconf/vendor/box/from_file.py      | 4 ++--
+ dynaconf/vendor_src/box/converters.py | 4 ++--
+ dynaconf/vendor_src/box/from_file.py  | 4 ++--
+ tests/test_cli.py                     | 2 +-
+ 11 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/dynaconf/cli.py b/dynaconf/cli.py
+index 5bb8316..1341a95 100644
+--- a/dynaconf/cli.py
++++ b/dynaconf/cli.py
+@@ -20,8 +20,8 @@ from dynaconf.utils.functional import empty
+ from dynaconf.utils.parse_conf import parse_conf_data
+ from dynaconf.validator import ValidationError
+ from dynaconf.validator import Validator
+-from dynaconf.vendor import click
+-from dynaconf.vendor import toml
++import click
++import toml
+ 
+ 
+ CWD = Path.cwd()
+diff --git a/dynaconf/default_settings.py b/dynaconf/default_settings.py
+index 66601b0..9605fc5 100644
+--- a/dynaconf/default_settings.py
++++ b/dynaconf/default_settings.py
+@@ -8,7 +8,7 @@ from dynaconf.utils import upperfy
+ from dynaconf.utils import warn_deprecations
+ from dynaconf.utils.files import find_file
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import load_dotenv
++from dotenv import load_dotenv
+ 
+ 
+ def try_renamed(key, value, older_key, current_key):
+diff --git a/dynaconf/loaders/env_loader.py b/dynaconf/loaders/env_loader.py
+index e7b13bd..b034c8a 100644
+--- a/dynaconf/loaders/env_loader.py
++++ b/dynaconf/loaders/env_loader.py
+@@ -2,7 +2,7 @@ from os import environ
+ 
+ from dynaconf.utils import upperfy
+ from dynaconf.utils.parse_conf import parse_conf_data
+-from dynaconf.vendor.dotenv import cli as dotenv_cli
++from dotenv import cli as dotenv_cli
+ 
+ 
+ IDENTIFIER = "env"
+diff --git a/dynaconf/loaders/toml_loader.py b/dynaconf/loaders/toml_loader.py
+index 07b973f..d81d675 100644
+--- a/dynaconf/loaders/toml_loader.py
++++ b/dynaconf/loaders/toml_loader.py
+@@ -5,7 +5,7 @@ from dynaconf import default_settings
+ from dynaconf.constants import TOML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ def load(obj, env=None, silent=True, key=None, filename=None):
+diff --git a/dynaconf/loaders/yaml_loader.py b/dynaconf/loaders/yaml_loader.py
+index 33c6532..3ef419a 100644
+--- a/dynaconf/loaders/yaml_loader.py
++++ b/dynaconf/loaders/yaml_loader.py
+@@ -7,7 +7,7 @@ from dynaconf.constants import YAML_EXTENSIONS
+ from dynaconf.loaders.base import BaseLoader
+ from dynaconf.utils import object_merge
+ from dynaconf.utils.parse_conf import try_to_encode
+-from dynaconf.vendor.ruamel import yaml
++from ruamel import yaml
+ 
+ # Add support for Dynaconf Lazy values to YAML dumper
+ yaml.SafeDumper.yaml_representers[
+diff --git a/dynaconf/utils/parse_conf.py b/dynaconf/utils/parse_conf.py
+index c42b07a..01ccdae 100644
+--- a/dynaconf/utils/parse_conf.py
++++ b/dynaconf/utils/parse_conf.py
+@@ -9,7 +9,7 @@ from dynaconf.utils import isnamedtupleinstance
+ from dynaconf.utils import multi_replace
+ from dynaconf.utils import recursively_evaluate_lazy_format
+ from dynaconf.utils.boxing import DynaBox
+-from dynaconf.vendor import toml
++import toml
+ 
+ try:
+     from jinja2 import Environment
+diff --git a/dynaconf/vendor/box/converters.py b/dynaconf/vendor/box/converters.py
+index 93cdcfb..e34c7dc 100644
+--- a/dynaconf/vendor/box/converters.py
++++ b/dynaconf/vendor/box/converters.py
+@@ -7,9 +7,9 @@ _B='utf-8'
+ _A=None
+ import csv,json,sys,warnings
+ from pathlib import Path
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError,BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ BOX_PARAMETERS='default_box','default_box_attr','conversion_box','frozen_box','camel_killer_box','box_safe_prefix','box_duplicates','ordered_box','default_box_none_transform','box_dots','modify_tuples_box','box_intact_types','box_recast'
+ def _exists(filename,create=_E):
+ 	A=filename;B=Path(A)
+diff --git a/dynaconf/vendor/box/from_file.py b/dynaconf/vendor/box/from_file.py
+index daa1137..d75940b 100644
+--- a/dynaconf/vendor/box/from_file.py
++++ b/dynaconf/vendor/box/from_file.py
+@@ -1,8 +1,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ from .exceptions import BoxError
+ from .box import Box
+ from .box_list import BoxList
+diff --git a/dynaconf/vendor_src/box/converters.py b/dynaconf/vendor_src/box/converters.py
+index c9a2293..ae42bf6 100644
+--- a/dynaconf/vendor_src/box/converters.py
++++ b/dynaconf/vendor_src/box/converters.py
+@@ -9,9 +9,9 @@ import sys
+ import warnings
+ from pathlib import Path
+ 
+-import dynaconf.vendor.ruamel.yaml as yaml
++import ruamel.yaml as yaml
+ from dynaconf.vendor.box.exceptions import BoxError, BoxWarning
+-from dynaconf.vendor import toml
++import toml
+ 
+ 
+ BOX_PARAMETERS = ('default_box', 'default_box_attr', 'conversion_box',
+diff --git a/dynaconf/vendor_src/box/from_file.py b/dynaconf/vendor_src/box/from_file.py
+index 2e2a6ad..3f76819 100644
+--- a/dynaconf/vendor_src/box/from_file.py
++++ b/dynaconf/vendor_src/box/from_file.py
+@@ -3,8 +3,8 @@
+ from json import JSONDecodeError
+ from pathlib import Path
+ from typing import Union
+-from dynaconf.vendor.toml import TomlDecodeError
+-from dynaconf.vendor.ruamel.yaml import YAMLError
++from toml import TomlDecodeError
++from ruamel.yaml import YAMLError
+ 
+ 
+ from .exceptions import BoxError
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index 6693701..df44409 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -11,7 +11,7 @@ from dynaconf.cli import main
+ from dynaconf.cli import read_file_in_root_directory
+ from dynaconf.cli import WRITERS
+ from dynaconf.utils.files import read_file
+-from dynaconf.vendor.click.testing import CliRunner
++from click.testing import CliRunner
+ 
+ 
+ runner = CliRunner()
+
+base-commit: ebf7b17cffd5e08b212948bd8036d580718d5bf8
+-- 
+2.32.0
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4181b47d10..dfd5668827 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -63,7 +63,7 @@
 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
-;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
@@ -141,6 +141,7 @@ (define-module (gnu packages python-xyz)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages django)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages djvu)
   #:use-module (gnu packages docker)
@@ -28074,3 +28075,75 @@ (define-public python-sgmllib3k
 It is used to parse text files formatted in @acronym{SGML,Standard Generalized
 Mark-up Language}.")
     (license license:bsd-3)))
+
+(define-public dynaconf
+  (package
+    (name "dynaconf")
+    (version "3.1.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/rochacbruno/dynaconf")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0pjyjsdzairpn5vq8nzddhxwxmr18grn272nj31wcy2ipwdl3c3h"))
+       (patches (search-patches "dynaconf-Unvendor-dependencies.patch"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Remove vendored dependencies
+                   (let ((unvendor '("click" "dotenv" "ruamel" "toml")))
+                     (with-directory-excursion "dynaconf/vendor"
+                       (for-each delete-file-recursively unvendor))
+                     (with-directory-excursion "dynaconf/vendor_src"
+                       (for-each delete-file-recursively unvendor)))))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? outputs #:allow-other-keys)
+             (when tests?
+               (setenv "PATH"
+                       (string-append (assoc-ref outputs "out") "/bin:"
+                                      (getenv "PATH")))
+               ;; These tests depend on hvac and a
+               ;; live Vault process.
+               (delete-file "tests/test_vault.py")
+               (invoke "make" "test_only")))))))
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-configobj" ,python-configobj)
+       ("python-dotenv" ,python-dotenv-0.13.0)
+       ("python-ruamel.yaml" ,python-ruamel.yaml)
+       ("python-toml" ,python-toml)))
+    (native-inputs
+     `(("python-django" ,python-django)
+       ("python-flask" ,python-flask)
+       ("python-pytest" ,python-pytest-6)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-mock" ,python-pytest-mock)))
+    (home-page "https://www.dynaconf.com/")
+    (synopsis "The dynamic configurator for your Python project")
+    (description
+     "This package provides @code{dynaconf} the dynamic configurator manager for
+your Python project.  It provides features such as:
+
+@itemize
+@item Inspired by the @url{https://12factor.net/config, 12-factor application guide};
+@item Settings management (default values, validation, parsing, templating);
+@item Protection of sensitive information (passwords/tokens);
+@item Multiple file formats @code{toml|yaml|json|ini|py} and also customizable
+loaders;
+@item Full support for environment variables to override existing settings
+(dotenv support included);
+@item Optional layered system for multiple environments @code{[default,
+development, testing, production]};
+@item Built-in support for Hashicorp Vault and Redis as settings and secrets storage;
+@item Built-in extensions for Django and Flask web frameworks;
+@item CLI for common operations such as @code{init, list, write, validate, export}.
+@end itemize")
+    (license license:expat)))
-- 
2.34.0
E
E
Efraim Flashner wrote on 1 Dec 2021 12:59
Re: [bug#49834] gnu: Add dynaconf.
(name . paul)(address . goodoldpaul@autistici.org)(address . 49834-done@debbugs.gnu.org)
Yadjo/arlivNMvFQ@3900XT
On Sat, Nov 20, 2021 at 12:40:36AM +0100, paul via Guix-patches via wrote:
Toggle quote (7 lines)
> Dear guixers,
>
>  I'm sending a new patch set rebased on current master where I updated
> dynaconf to version 3.1.7.
>
> Thank you for your time,

Thank you for keeping up with this patch set for so long! I ended up not
applying the ruamel.yaml patch since it broke some other packages, but
the other 3 were no problem.

Patches pushed! Thanks.

--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmGnY6MACgkQQarn3Mo9
g1EqnhAAnDwfBXqzf0/dYYzpHzwIHcCYtsVR2xwA5EEN4twOLxXxDlyM1JSLSUB5
CyszSxMG50aaVWDe1ENoKUkemRyM7ChAAh9V+A7RgcXhRNyb7ZpVo1oFH0DOdpnf
oUGy8cbONnnZixgJFbBETUPGRIQYyDf4AvOyJIy/kb/3IF4NzXQeURdsvLrhz0jU
jrKcxXMBjfguU0OR6SK1/dIeEYw/f12GeqWQ0XU9PLbrri9+fWC+gpev9VvujqLI
xvh0v2TMygGUg1Uvi6QfHo4ea1jXef3AebrBQ8F5nih6iirPBV7JRRP34HXkJ/RQ
fU72NB5Kxys9zoMskNdJnimqDc2c8H9kLHm3skEx/N5pG9oLT0wa3mxKrp7oijix
YmwIoWkg68a5dxVnWhnbZaFxGUH0PnYN14HKSOzhjfCu2SIcYPoCzh3lm10Ls9uA
b1Uk/NxdgLfCWZryFJF+eleat/jKJQdRyeoIS+ofOu0AEPgXjCqEIN9xmN/U91qZ
9C6Z7bgg1oqdLtSaw0jcn0yiWBDuLtunwPGeTlgU3hcXLgpf9W9cv/fVrCaQJzSU
cr3AGFbqpVoY6vOt2LraUTcht6FZdXQPemq9UQzyGS0745ToC84mG57CEYmzegJt
UIsFwwyx5iRlFrLkiHbBzJq4hMgXVYUitbCaLc1qoqbL+5UEJIw=
=BHca
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 49834@debbugs.gnu.org