Package: guix-patches;
Reported by: Giacomo Leidi <goodoldpaul <at> autistici.org>
Date: Mon, 2 Aug 2021 18:16:04 UTC
Severity: normal
Tags: patch
Merged with 49281, 49829, 49830, 49831, 49832, 49833, 49835
Done: Efraim Flashner <efraim <at> flashner.co.il>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49834 in the body.
You can then email your comments to 49834 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Mon, 02 Aug 2021 18:16:05 GMT) Full text and rfc822 format available.Giacomo Leidi <goodoldpaul <at> autistici.org>
:guix-patches <at> gnu.org
.
(Mon, 02 Aug 2021 18:16:05 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: guix-patches <at> gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 1/7] gnu: Add python-flake8-debugger. Date: Mon, 2 Aug 2021 20:13:53 +0200
* 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 <at> ajgrf.com> ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois <at> gmx.com> ;;; Copyright © 2019 Jacob MacDonald <jaccarmac <at> gmail.com> -;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul <at> autistici.org> +;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul <at> autistici.org> ;;; Copyright © 2019 Wiktor Żelazny <wzelazny <at> vurv.cz> ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy <at> bioneland.org> ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu <at> 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
Sarah Morgensen <iskarian <at> mgsn.dev>
to control <at> debbugs.gnu.org
.
(Mon, 02 Aug 2021 21:14:01 GMT) Full text and rfc822 format available.guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Wed, 04 Aug 2021 18:27:02 GMT) Full text and rfc822 format available.Message #10 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Sarah Morgensen <iskarian <at> mgsn.dev> To: Giacomo Leidi <goodoldpaul <at> autistici.org> Cc: 49834 <at> debbugs.gnu.org, 49281 <at> debbugs.gnu.org Subject: Re: bug#49281: Add dynaconf Date: Wed, 04 Aug 2021 11:26:11 -0700
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 <at> autistici.org> writes: > * 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 <at> ajgrf.com> > ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois <at> gmx.com> > ;;; Copyright © 2019 Jacob MacDonald <jaccarmac <at> gmail.com> > -;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul <at> autistici.org> > +;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul <at> autistici.org> > ;;; Copyright © 2019 Wiktor Żelazny <wzelazny <at> vurv.cz> > ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy <at> bioneland.org> > ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu <at> 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?) > + > (define-public python-flake8-implicit-str-concat > (package > (name "python-flake8-implicit-str-concat") > > base-commit: f12a35cfa22092a7e3157c94abfef8335f86ac1c -- Sarah
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:52:01 GMT) Full text and rfc822 format available.Message #13 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: paul <goodoldpaul <at> autistici.org> To: Sarah Morgensen <iskarian <at> mgsn.dev> Cc: 49834 <at> debbugs.gnu.org Subject: Re: bug#49834: Add dynaconf Date: Sat, 28 Aug 2021 13:50:58 +0200
Dear Sarah, thank you for your review! 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. 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 [0]: https://github.com/JBKahn/flake8-debugger/pull/29/files
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:53:02 GMT) Full text and rfc822 format available.Message #16 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 1/6] gnu: Add python-flake8-todo. Date: Sat, 28 Aug 2021 13:51:48 +0200
* gnu/packages/python-xyz.scm (python-flake8-todo): New variable. --- gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:53:02 GMT) Full text and rfc822 format available.Message #19 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 2/6] gnu: Add python-dotenv. Date: Sat, 28 Aug 2021 13:51:49 +0200
* gnu/packages/python-xyz.scm (python-dotenv): New variable. --- gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:53:03 GMT) Full text and rfc822 format available.Message #22 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 3/6] gnu: Add python-box. Date: Sat, 28 Aug 2021 13:51:50 +0200
* gnu/packages/python-xyz.scm (python-box): New variable. --- gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:53:03 GMT) Full text and rfc822 format available.Message #25 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 5/6] gnu: Add python-pep8-naming. Date: Sat, 28 Aug 2021 13:51:52 +0200
* gnu/packages/python-xyz.scm (python-pep8-naming): New variable. --- gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:53:03 GMT) Full text and rfc822 format available.Message #28 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 4/6] gnu: python-ruamel.yaml: Update to 0.17.10. Date: Sat, 28 Aug 2021 13:51:51 +0200
* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10. --- gnu/packages/serialization.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 11:53:04 GMT) Full text and rfc822 format available.Message #31 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 6/6] gnu: Add dynaconf. Date: Sat, 28 Aug 2021 13:51:53 +0200
* 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 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 <at> 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sat, 28 Aug 2021 22:47:02 GMT) Full text and rfc822 format available.Message #34 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Sarah Morgensen <iskarian <at> mgsn.dev> To: Giacomo Leidi <goodoldpaul <at> autistici.org> Cc: 49834 <at> debbugs.gnu.org Subject: Re: [bug#49834] Add dynaconf Date: Sat, 28 Aug 2021 15:46:14 -0700
Hi Giacomo, Giacomo Leidi <goodoldpaul <at> autistici.org> writes: > 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. > > 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! > > 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 <at> mgsn.dev> writes: > Hi, > > Thanks again for your work on packaging this! > > Giacomo Leidi <goodoldpaul <at> 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sun, 29 Aug 2021 22:53:02 GMT) Full text and rfc822 format available.Message #37 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: paul <goodoldpaul <at> autistici.org> To: Sarah Morgensen <iskarian <at> mgsn.dev> Cc: 49834 <at> debbugs.gnu.org Subject: Re: [bug#49834] Add dynaconf Date: Mon, 30 Aug 2021 00:52:45 +0200
Dear Sarah, On 8/29/21 12:46 AM, Sarah Morgensen wrote: > 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. > * 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. >>> * 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! >> >>> + (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. >> >>> + (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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sun, 29 Aug 2021 22:54:02 GMT) Full text and rfc822 format available.Message #40 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 2/4] gnu: python-ruamel.yaml: Update to 0.17.10. Date: Mon, 30 Aug 2021 00:53:15 +0200
* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10. --- gnu/packages/serialization.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sun, 29 Aug 2021 22:54:02 GMT) Full text and rfc822 format available.Message #43 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 1/4] gnu: Add python-dotenv. Date: Mon, 30 Aug 2021 00:53:14 +0200
* gnu/packages/python-xyz.scm (python-dotenv): New variable. --- gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sun, 29 Aug 2021 22:54:03 GMT) Full text and rfc822 format available.Message #46 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 3/4] gnu: Add python-dotenv-0.13.0. Date: Mon, 30 Aug 2021 00:53:16 +0200
* gnu/packages/python-xyz.scm (python-dotenv-0.13.0): New variable. --- gnu/packages/python-xyz.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Sun, 29 Aug 2021 22:54:03 GMT) Full text and rfc822 format available.Message #49 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 4/4] gnu: Add dynaconf. Date: Mon, 30 Aug 2021 00:53:17 +0200
* 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 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 <at> 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Thu, 07 Oct 2021 22:51:02 GMT) Full text and rfc822 format available.Message #52 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: paul <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Subject: [PATCH 1/7] gnu: Add python-flake8-debugger. Date: Fri, 8 Oct 2021 00:49:49 +0200
[Message part 1 (text/plain, inline)]
Dear guixers, this is a friendly ping :) . I'm attaching the patch set rebased on current master. Thank you for your time, paul
[0001-gnu-Add-python-dotenv.patch (text/x-patch, attachment)]
[0002-gnu-python-ruamel.yaml-Update-to-0.17.10.patch (text/x-patch, attachment)]
[0003-gnu-Add-python-dotenv-0.13.0.patch (text/x-patch, attachment)]
[0004-gnu-Add-dynaconf.patch (text/x-patch, attachment)]
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Fri, 19 Nov 2021 23:41:01 GMT) Full text and rfc822 format available.Message #55 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: paul <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Subject: gnu: Add dynaconf. Date: Sat, 20 Nov 2021 00:40:36 +0100
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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Fri, 19 Nov 2021 23:42:02 GMT) Full text and rfc822 format available.Message #58 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 1/4] gnu: Add python-dotenv. Date: Sat, 20 Nov 2021 00:41:22 +0100
* gnu/packages/python-xyz.scm (python-dotenv): New variable. --- gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Fri, 19 Nov 2021 23:42:02 GMT) Full text and rfc822 format available.Message #61 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 3/4] gnu: Add python-dotenv-0.13.0. Date: Sat, 20 Nov 2021 00:41:24 +0100
* gnu/packages/python-xyz.scm (python-dotenv-0.13.0): New variable. --- gnu/packages/python-xyz.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Fri, 19 Nov 2021 23:42:02 GMT) Full text and rfc822 format available.Message #64 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 2/4] gnu: python-ruamel.yaml: Update to 0.17.10. Date: Sat, 20 Nov 2021 00:41:23 +0100
* gnu/packages/serialization.scm (python-ruamel.yaml): Update to 0.17.10. --- gnu/packages/serialization.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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
guix-patches <at> gnu.org
:bug#49834
; Package guix-patches
.
(Fri, 19 Nov 2021 23:42:03 GMT) Full text and rfc822 format available.Message #67 received at 49834 <at> debbugs.gnu.org (full text, mbox):
From: Giacomo Leidi <goodoldpaul <at> autistici.org> To: 49834 <at> debbugs.gnu.org Cc: Giacomo Leidi <goodoldpaul <at> autistici.org> Subject: [PATCH 4/4] gnu: Add dynaconf. Date: Sat, 20 Nov 2021 00:41:25 +0100
* 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 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 <at> 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 <at> ajgrf.com> ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois <at> gmx.com> ;;; Copyright © 2019 Jacob MacDonald <jaccarmac <at> gmail.com> -;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul <at> autistici.org> +;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul <at> autistici.org> ;;; Copyright © 2019 Wiktor Żelazny <wzelazny <at> vurv.cz> ;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy <at> bioneland.org> ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu <at> 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
Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Message #72 received at 49834-done <at> debbugs.gnu.org (full text, mbox):
From: Efraim Flashner <efraim <at> flashner.co.il> To: paul <goodoldpaul <at> autistici.org> Cc: 49834-done <at> debbugs.gnu.org Subject: Re: [bug#49834] gnu: Add dynaconf. Date: Wed, 1 Dec 2021 13:59:31 +0200
[Message part 1 (text/plain, inline)]
On Sat, Nov 20, 2021 at 12:40:36AM +0100, paul via Guix-patches via wrote: > 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 <at> 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
[signature.asc (application/pgp-signature, inline)]
Efraim Flashner <efraim <at> flashner.co.il>
:paul <goodoldpaul <at> autistici.org>
:Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Efraim Flashner <efraim <at> flashner.co.il>
:Giacomo Leidi <goodoldpaul <at> autistici.org>
:Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 29 Dec 2021 12:24:06 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.