Add dynaconf

  • Done
  • quality assurance status badge
Details
2 participants
  • paul
  • Sarah Morgensen
Owner
unassigned
Submitted by
paul
Severity
normal
Merged with
P
(address . guix-patches@gnu.org)
db02994e-bb53-ec60-369d-e1c61de08332@autistici.org
Hi Guixers :),

I'm sending a patch series to add dynaconf.

Thank you for your time,

Giacomo
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 2/7] gnu: Add python-flake8-todo.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-2-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 (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e98dc164fa..f2d0b6d76d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9641,6 +9641,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")
--
2.32.0
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 1/7] gnu: Add python-flake8-debugger.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-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 (47 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bb28120c25..e98dc164fa 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 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2019, 2021 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
@@ -9459,6 +9459,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")
--
2.32.0
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 3/7] gnu: Add python-dotenv.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-3-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 f2d0b6d76d..5d8bb8fc80 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26087,3 +26087,30 @@ is the cythonized version of @code{fractions.Fraction}.")
"@code{pathvalidate} is a Python library to sanitize/validate strings
representing paths or filenames.")
(license license:expat)))
+
+(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.32.0
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 4/7] gnu: Add python-box.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-4-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 5d8bb8fc80..21ae2fe4f5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26114,3 +26114,27 @@ representing paths or filenames.")
"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.32.0
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 5/7] gnu: python-ruamel.yaml: Update to 0.17.10.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-5-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 8f292ae408..bd82cd2598 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -463,14 +463,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.32.0
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 6/7] gnu: Add python-pep8-naming.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-6-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-pep8-naming): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 21ae2fe4f5..c7f91dd977 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9245,6 +9245,36 @@ PEP 8.")
(define-public python2-pep8
(package-with-python2 python-pep8))
+(define-public python-pep8-naming
+ (package
+ (name "python-pep8-naming")
+ (version "0.11.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pep8-naming" version))
+ (sha256
+ (base32
+ "0937rnk3c2z1jkdmbw9hfm80p5k467q7rqhn6slfiprs4kflgpd1"))))
+ (build-system python-build-system)
+ (arguments
+ ;; Tests are broken. They work from the top
+ ;; of the master branch, so hopefully we'll
+ ;; be able to enable them in the future.
+ '(#:tests? #f))
+ (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.32.0
G
G
Giacomo Leidi wrote on 30 Jun 2021 00:42
[PATCH 7/7] gnu: Add dynaconf.
(address . 49281@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20210629224245.29530-7-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 | 40096 ++++++++++++++++
gnu/packages/python-xyz.scm | 87 +
3 files changed, 40184 insertions(+)
create mode 100644 gnu/packages/patches/dynaconf-Unvendor-dependencies.patch

Toggle diff (348 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6b9202cba1..a296d24fe4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -967,6 +967,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..a7d184e662
--- /dev/null
+++ b/gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
@@ -0,0 +1,40096 @@
+From 73a56e307650000b576fe28ab2afe824a186d1da Mon Sep 17 00:00:00 2001
+From: Giacomo Leidi <goodoldpaul@autistici.org>
+Date: Sat, 24 Apr 2021 22:59:37 +0200
+Subject: [PATCH] Unbundle some 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 +-
+ dynaconf/vendor/click/README.md | 5 -
+ dynaconf/vendor/click/__init__.py | 60 -
+ dynaconf/vendor/click/_bashcomplete.py | 114 -
+ dynaconf/vendor/click/_compat.py | 240 --
+ dynaconf/vendor/click/_termui_impl.py | 262 ---
+ dynaconf/vendor/click/_textwrap.py | 19 -
+ dynaconf/vendor/click/_unicodefun.py | 28 -
+ dynaconf/vendor/click/_winconsole.py | 108 -
+ dynaconf/vendor/click/core.py | 620 -----
+ dynaconf/vendor/click/decorators.py | 115 -
+ dynaconf/vendor/click/exceptions.py | 76 -
+ dynaconf/vendor/click/formatting.py | 90 -
+ dynaconf/vendor/click/globals.py | 14 -
+ dynaconf/vendor/click/parser.py | 157 --
+ dynaconf/vendor/click/termui.py | 135 --
+ dynaconf/vendor/click/testing.py | 108 -
+ dynaconf/vendor/click/types.py | 227 --
+ dynaconf/vendor/click/utils.py | 119 -
+ dynaconf/vendor/dotenv/README.md | 6 -
+ dynaconf/vendor/dotenv/__init__.py | 18 -
+ dynaconf/vendor/dotenv/cli.py | 56 -
+ dynaconf/vendor/dotenv/compat.py | 18 -
+ dynaconf/vendor/dotenv/ipython.py | 18 -
+ dynaconf/vendor/dotenv/main.py | 114 -
+ dynaconf/vendor/dotenv/parser.py | 85 -
+ dynaconf/vendor/dotenv/py.typed | 1 -
+ dynaconf/vendor/dotenv/version.py | 1 -
+ dynaconf/vendor/ruamel/__init__.py | 0
+ dynaconf/vendor/ruamel/yaml/CHANGES | 957 --------
+ dynaconf/vendor/ruamel/yaml/LICENSE | 21 -
+ dynaconf/vendor/ruamel/yaml/MANIFEST.in | 3 -
+ dynaconf/vendor/ruamel/yaml/PKG-INFO | 782 -------
+ dynaconf/vendor/ruamel/yaml/README.rst | 752 ------
+ dynaconf/vendor/ruamel/yaml/__init__.py | 10 -
+ dynaconf/vendor/ruamel/yaml/anchor.py | 7 -
+ dynaconf/vendor/ruamel/yaml/comments.py | 485 ----
+ dynaconf/vendor/ruamel/yaml/compat.py | 120 -
+ dynaconf/vendor/ruamel/yaml/composer.py | 82 -
+ .../vendor/ruamel/yaml/configobjwalker.py | 4 -
+ dynaconf/vendor/ruamel/yaml/constructor.py | 728 ------
+ dynaconf/vendor/ruamel/yaml/cyaml.py | 20 -
+ dynaconf/vendor/ruamel/yaml/dumper.py | 16 -
+ dynaconf/vendor/ruamel/yaml/emitter.py | 678 ------
+ dynaconf/vendor/ruamel/yaml/error.py | 90 -
+ dynaconf/vendor/ruamel/yaml/events.py | 45 -
+ dynaconf/vendor/ruamel/yaml/loader.py | 18 -
+ dynaconf/vendor/ruamel/yaml/main.py | 462 ----
+ dynaconf/vendor/ruamel/yaml/nodes.py | 32 -
+ dynaconf/vendor/ruamel/yaml/parser.py | 216 --
+ dynaconf/vendor/ruamel/yaml/py.typed | 0
+ dynaconf/vendor/ruamel/yaml/reader.py | 117 -
+ dynaconf/vendor/ruamel/yaml/representer.py | 578 -----
+ dynaconf/vendor/ruamel/yaml/resolver.py | 160 --
+ dynaconf/vendor/ruamel/yaml/scalarbool.py | 21 -
+ dynaconf/vendor/ruamel/yaml/scalarfloat.py | 33 -
+ dynaconf/vendor/ruamel/yaml/scalarint.py | 37 -
+ dynaconf/vendor/ruamel/yaml/scalarstring.py | 59 -
+ dynaconf/vendor/ruamel/yaml/scanner.py | 602 -----
+ dynaconf/vendor/ruamel/yaml/serializer.py | 91 -
+ dynaconf/vendor/ruamel/yaml/setup.cfg | 4 -
+ dynaconf/vendor/ruamel/yaml/setup.py | 402 ----
+ dynaconf/vendor/ruamel/yaml/timestamp.py | 8 -
+ dynaconf/vendor/ruamel/yaml/tokens.py | 97 -
+ dynaconf/vendor/ruamel/yaml/util.py | 69 -
+ dynaconf/vendor/toml/README.md | 5 -
+ dynaconf/vendor/toml/__init__.py | 16 -
+ dynaconf/vendor/toml/decoder.py | 515 ----
+ dynaconf/vendor/toml/encoder.py | 134 --
+ dynaconf/vendor/toml/ordered.py | 7 -
+ dynaconf/vendor/toml/tz.py | 10 -
+ dynaconf/vendor/vendor.txt | 4 -
+ dynaconf/vendor_src/box/converters.py | 4 +-
+ dynaconf/vendor_src/box/from_file.py | 4 +-
+ dynaconf/vendor_src/click/README.md | 5 -
+ dynaconf/vendor_src/click/__init__.py | 75 -
+ dynaconf/vendor_src/click/_bashcomplete.py | 371 ---
+ dynaconf/vendor_src/click/_compat.py | 611 -----
+ dynaconf/vendor_src/click/_termui_impl.py | 667 ------
+ dynaconf/vendor_src/click/_textwrap.py | 37 -
+ dynaconf/vendor_src/click/_unicodefun.py | 82 -
+ dynaconf/vendor_src/click/_winconsole.py | 308 ---
+ dynaconf/vendor_src/click/core.py | 2070 -----------------
+ dynaconf/vendor_src/click/decorators.py | 331 ---
+ dynaconf/vendor_src/click/exceptions.py | 233 --
+ dynaconf/vendor_src/click/formatting.py | 279 ---
+ dynaconf/vendor_src/click/globals.py | 47 -
+ dynaconf/vendor_src/click/parser.py | 431 ----
+ dynaconf/vendor_src/click/termui.py | 688 ------
+ dynaconf/vendor_src/click/testing.py | 362 ---
+ dynaconf/vendor_src/click/types.py | 726 ------
+ dynaconf/vendor_src/click/utils.py | 440 ----
+ dynaconf/vendor_src/dotenv/README.md | 6 -
+ dynaconf/vendor_src/dotenv/__init__.py | 46 -
+ dynaconf/vendor_src/dotenv/cli.py | 145 --
+ dynaconf/vendor_src/dotenv/compat.py | 49 -
+ dynaconf/vendor_src/dotenv/ipython.py | 41 -
+ dynaconf/vendor_src/dotenv/main.py | 323 ---
+ dynaconf/vendor_src/dotenv/parser.py | 237 --
+ dynaconf/vendor_src/dotenv/py.typed | 1 -
+ dynaconf/vendor_src/dotenv/version.py | 1 -
+ dynaconf/vendor_src/ruamel/__init__.py | 0
+ dynaconf/vendor_src/ruamel/yaml/CHANGES | 957 --------
+ dynaconf/vendor_src/ruamel/yaml/LICENSE | 21 -
+ dynaconf/vendor_src/ruamel/yaml/MANIFEST.in | 3 -
+ dynaconf/vendor_src/ruamel/yaml/PKG-INFO | 782 -------
+ dynaconf/vendor_src/ruamel/yaml/README.rst | 752 ------
+ dynaconf/vendor_src/ruamel/yaml/__init__.py | 60 -
+ dynaconf/vendor_src/ruamel/yaml/anchor.py | 20 -
+ dynaconf/vendor_src/ruamel/yaml/comments.py | 1149 ---------
+ dynaconf/vendor_src/ruamel/yaml/compat.py | 324 ---
+ dynaconf/vendor_src/ruamel/yaml/composer.py | 238 --
+ .../vendor_src/ruamel/yaml/configobjwalker.py | 14 -
+ .../vendor_src/ruamel/yaml/constructor.py | 1805 --------------
+ dynaconf/vendor_src/ruamel/yaml/cyaml.py | 185 --
+ dynaconf/vendor_src/ruamel/yaml/dumper.py | 221 --
+ dynaconf/vendor_src/ruamel/yaml/emitter.py | 1688 --------------
+ dynaconf/vendor_src/ruamel/yaml/error.py | 311 ---
+ dynaconf/vendor_src/ruamel/yaml/events.py | 157 --
+ dynaconf/vendor_src/ruamel/yaml/loader.py | 74 -
+ dynaconf/vendor_src/ruamel/yaml/main.py | 1534 ------------
+ dynaconf/vendor_src/ruamel/yaml/nodes.py | 131 --
+ dynaconf/vendor_src/ruamel/yaml/parser.py | 802 -------
+ dynaconf/vendor_src/ruamel/yaml/py.typed | 0
+ dynaconf/vendor_src/ruamel/yaml/reader.py | 311 ---
+ .../vendor_src/ruamel/yaml/representer.py | 1283 ----------
+ dynaconf/vendor_src/ruamel/yaml/resolver.py | 399 ----
+ dynaconf/vendor_src/ruamel/yaml/scalarbool.py | 51 -
+ .../vendor_src/ruamel/yaml/scalarfloat.py | 127 -
+ dynaconf/vendor_src/ruamel/yaml/scalarint.py | 130 --
+ .../vendor_src/ruamel/yaml/scalarstring.py | 156 --
+ dynaconf/vendor_src/ruamel/yaml/scanner.py | 1980 ----------------
+ dynaconf/vendor_src/ruamel/yaml/serializer.py | 240 --
+ dynaconf/vendor_src/ruamel/yaml/setup.cfg | 4 -
+ dynaconf/vendor_src/ruamel/yaml/setup.py | 962 --------
+ dynaconf/vendor_src/ruamel/yaml/timestamp.py | 28 -
+ dynaconf/vendor_src/ruamel/yaml/tokens.py | 286 ---
+ dynaconf/vendor_src/ruamel/yaml/util.py | 190 --
+ dynaconf/vendor_src/toml/README.md | 5 -
+ dynaconf/vendor_src/toml/__init__.py | 25 -
+ dynaconf/vendor_src/toml/decoder.py | 1052 ---------
+ dynaconf/vendor_src/toml/encoder.py | 304 ---
+ dynaconf/vendor_src/toml/ordered.py | 15 -
+ dynaconf/vendor_src/toml/tz.py | 21 -
+ dynaconf/vendor_src/vendor.txt | 4 -
+ tests/test_cli.py | 2 +-
+ 153 files changed, 18 insertions(+), 38742 deletions(-)
+ delete mode 100644 dynaconf/vendor/click/README.md
+ delete mode 100644 dynaconf/vendor/click/__init__.py
+ delete mode 100644 dynaconf/vendor/click/_bashcomplete.py
+ delete mode 100644 dynaconf/vendor/click/_compat.py
+ delete mode 100644 dynaconf/vendor/click/_termui_impl.py
+ delete mode 100644 dynaconf/vendor/click/_textwrap.py
+ delete mode 100644 dynaconf/vendor/click/_unicodefun.py
+ delete mode 100644 dynaconf/vendor/click/_winconsole.py
+ delete mode 100644 dynaconf/vendor/click/core.py
+ delete mode 100644 dynaconf/vendor/click/decorators.py
+ delete mode 100644 dynaconf/vendor/click/exceptions.py
+ delete mode 100644 dynaconf/vendor/click/formatting.py
+ delete mode 100644 dynaconf/vendor/click/globals.py
+ delete mode 100644 dynaconf/vendor/click/parser.py
+ delete mode 100644 dynaconf/vendor/click/termui.py
+ delete mode 100644 dynaconf/vendor/click/testing.py
+ delete mode 100644 dynaconf/vendor/click/types.py
+ delete mode 100644 dynaconf/vendor/click/utils.py
+ delete mode 100644 dynaconf/vendor/dotenv/README.md
+ delete mode 100644 dynaconf/vendor/dotenv/__init__.py
+ delete mode 100644 dynaconf/vendor/dotenv/cli.py
+ delete mode 100644 dynaconf/vendor/dotenv/compat.py
+ delete mode 100644 dynaconf/vendor/dotenv/ipython.py
+ delete mode 100644 dynaconf/vendor/dotenv/main.py
+ delete mode 100644 dynaconf/vendor/dotenv/parser.py
+ delete mode 100644 dynaconf/vendor/dotenv/py.typed
+ delete mode 100644 dynaconf/vendor/dotenv/version.py
+ delete mode 100644 dynaconf/vendor/ruamel/__init__.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/CHANGES
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/LICENSE
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/MANIFEST.in
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/PKG-INFO
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/README.rst
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/__init__.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/anchor.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/comments.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/compat.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/composer.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/configobjwalker.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/constructor.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/cyaml.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/dumper.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/emitter.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/error.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/events.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/loader.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/main.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/nodes.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/parser.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/py.typed
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/reader.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/representer.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/resolver.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/scalarbool.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/scalarfloat.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/scalarint.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/scalarstring.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/scanner.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/serializer.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/setup.cfg
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/setup.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/timestamp.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/tokens.py
+ delete mode 100644 dynaconf/vendor/ruamel/yaml/util.py
+ delete mode 100644 dynaconf/vendor/toml/README.md
+ delete mode 100644 dynaconf/vendor/toml/__init__.py
+ delete mode 100644 dynaconf/vendor/toml/decoder.py
+ delete mode 100644 dynaconf/vendor/toml/encoder.py
+ delete mode 100644 dynaconf/vendor/toml/ordered.py
+ delete mode 100644 dynaconf/vendor/toml/tz.py
+ delete mode 100644 dynaconf/vendor_src/click/README.md
+ delete mode 100644 dynaconf/vendor_src/click/__init__.py
+ delete mode 100644 dynaconf/vendor_src/click/_bashcomplete.py
+ delete mode 100644 dynaconf/vendor_src/click/_compat.py
+ delete mode 100644 dynaconf/vendor_src/click/_termui_impl.py
+ delete mode 100644 dynaconf/vendor_src/click/_textwrap.py
+ delete mode 100644 dynaconf/vendor_src/click/_unicodefun.py
+ delete mode 100644 dynaconf/vendor_src/click/_winconsole.py
+ delete mode 100644 dynaconf/vendor_src/click/core.py
+ delete mode 100644 dynaconf/vendor_src/click/decorators.py
+ delete mode 100644 dynaconf/vendor_src/click/exceptions.py
+ delete mode 100644 dynaconf/vendor_src/click/formatting.py
+ delete mode 100644 dynaconf/vendor_src/click/globals.py
+ delete mode 100644 dynaconf/vendor_src/click/parser.py
+ delete mode 100644 dynaconf/vendor_src/click/termui.py
+ delete mode 100644 dynaconf/vendor_src/click/testing.py
+ delete mode 100644 dynaconf/vendor_src/click/types.py
+ delete mode 100644 dynaconf/vendor_src/click/utils.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/README.md
+ delete mode 100644 dynaconf/vendor_src/dotenv/__init__.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/cli.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/compat.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/ipython.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/main.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/parser.py
+ delete mode 100644 dynaconf/vendor_src/dotenv/py.typed
+ delete mode 100644 dynaconf/vendor_src/dotenv/version.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/__init__.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/CHANGES
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/LICENSE
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/MANIFEST.in
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/PKG-INFO
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/README.rst
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/__init__.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/anchor.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/comments.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/compat.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/composer.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/configobjwalker.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/constructor.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/cyaml.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/dumper.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/emitter.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/error.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/events.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/loader.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/main.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/nodes.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/parser.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/py.typed
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/reader.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/representer.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/resolver.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/scalarbool.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/scalarfloat.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/scalarint.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/scalarstring.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/scanner.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/serializer.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/setup.cfg
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/setup.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/timestamp.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/tokens.py
+ delete mode 100644 dynaconf/vendor_src/ruamel/yaml/util.py
+ delete mode 100644 dynaconf/vendor_src/toml/README.md
+ delete mode 100644 dynaconf/vendor_src/toml/__init__.py
+ delete mode 100644 dynaconf/vendor_src/toml/decoder.py
+ delete mode 100644 dynaconf/vendor_src/toml/encoder.py
+ delete mode 100644 dynaconf/vendor_src/toml/ordered.py
+ delete mode 100644 dynaconf/vendor_src/toml/tz.py
+
+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
This message was truncated. Download the full message here.
S
S
Sarah Morgensen wrote on 23 Jul 2021 08:14
Re: bug#49281: Add dynaconf
(name . paul)(address . goodoldpaul@autistici.org)(address . 49281@debbugs.gnu.org)
86im11r1yr.fsf@mgsn.dev
Hello,

Thanks for the patches :) The fight against vendoring is eternal.

I have a few suggestions:

* Unvendoring or otherwise removing files from sources is typically done
with a snippet in the origin rather than a patch, as it's much smaller
and doesn't break when updating. It might look like (untested):

(origin
...
(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))))))

You'll still have to have the edits to dynaconf as a patch, of course.

* You've still included a python-box package despite none of the
packages in your patch using it.

* pep8-naming has released 12.0.0, and tests pass :)

* Some of your patches no longer apply on master, and you should rebase
them before sending a revised patchset. Consider using the `--base`
option with format-patch, which helps git know what commit the patch
is based on when applying.

paul <goodoldpaul@autistici.org> writes:

Toggle quote (8 lines)
> Hi Guixers :),
>
> I'm sending a patch series to add dynaconf.
>
> Thank you for your time,
>
> Giacomo

Best,

Sarah
P
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)(address . 49281@debbugs.gnu.org)
ec86a3e7-33c2-9451-fc5e-39af713f01c9@autistici.org
Dear Sarah,

thank you for your suggestions :D , I believe I addressed most of them.

On 7/23/21 8:14 AM, Sarah Morgensen wrote:
Toggle quote (17 lines)
> * Unvendoring or otherwise removing files from sources is typically done
> with a snippet in the origin rather than a patch, as it's much smaller
> and doesn't break when updating. It might look like (untested):
>
> (origin
> ...
> (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))))))
>
> You'll still have to have the edits to dynaconf as a patch, of course.
It make much more sense, now the patch just changes the imports and the
actual removal is up to the snippet.
Toggle quote (2 lines)
> * You've still included a python-box package despite none of the
> packages in your patch using it.
Yes I included it while unvendoring, I figured since the tests pass it
would still make sense to upstream it. Should I remove it?
Toggle quote (1 lines)
> * pep8-naming has released 12.0.0, and tests pass :)
Fixed, thanks !
Toggle quote (5 lines)
> * Some of your patches no longer apply on master, and you should rebase
> them before sending a revised patchset. Consider using the `--base`
> option with format-patch, which helps git know what commit the patch
> is based on when applying.

I rebased and I'll send the patches with
--base=f12a35cfa22092a7e3157c94abfef8335f86ac1c .

Thank you for your help!


Cheers,

giacomo
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
S
S
Sarah Morgensen wrote on 4 Aug 2021 20:35
(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
86fsvp2h3h.fsf_-_@mgsn.dev
Hello,

While we don't actually require doing this when pypi packages don't have
tests, on a lark I went ahead and switched the source to upstream and
enabled tests to make sure they passed. It looks like two are failing,
but I'm not sure why. I've attached the patch to enable tests and the
test output.

Giacomo Leidi <goodoldpaul@autistici.org> writes:

Toggle quote (34 lines)
> * 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 cdfc78478c..f415d8b2c8 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26239,3 +26239,30 @@ enabling you to write CommonMark inside of Docutils & Sphinx projects.")
> Qhull} for the computation of the convex hull, Delaunay triangulation, and
> Voronoi diagram.")
> (license license:expat)))
> +
> +(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")
^ Nitpick: this can go on one line.
Toggle quote (2 lines)
> + (synopsis
> + "Setup environment variables according to .env files")
^ Likewise.
Toggle quote (4 lines)
> + (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)))
Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f4f3b7fb3f..a5b700f2d3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26282,16 +26282,31 @@ Voronoi diagram.")
(version "0.18.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "python-dotenv" version))
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/theskumar/python-dotenv")
+ (commit (string-append "v" version))))
(sha256
(base32
- "0b90br3f48ykx5ddfpx2zmsh4vmdqw6s812drcy9pn2q3qyarypg"))))
+ "1jdccd9s7ypsldafiv0mqgh616662fm5a5ppbhphnin44qv7mir1"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (setenv "PATH"
+ (string-append (assoc-ref outputs "out") "/bin:"
+ (getenv "PATH")))
+ (add-installed-pythonpath inputs outputs)
+ (invoke "py.test" "tests/")))))))
(propagated-inputs
`(("python-click" ,python-click-5)))
(native-inputs
- `(("python-mock" ,python-mock)
+ `(("python-ipython" ,python-ipython)
+ ("python-mock" ,python-mock)
("python-pytest" ,python-pytest)
("python-sh" ,python-sh)))
(home-page
starting phase `check'
============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
rootdir: /tmp/guix-build-python-dotenv-0.18.0.drv-0/source, inifile: setup.cfg
plugins: hypothesis-5.4.1
collected 132 items

tests/test_cli.py ..F............F.......... [ 19%]
tests/test_ipython.py ... [ 21%]
tests/test_main.py ..................................................... [ 62%]
[ 62%]
tests/test_parser.py ........................................... [ 94%]
tests/test_utils.py . [ 95%]
tests/test_variables.py ...... [100%]

=================================== FAILURES ===================================
______________________________ test_list_no_file _______________________________

cli = <click.testing.CliRunner object at 0x7ffff5ed8100>

def test_list_no_file(cli):
result = cli.invoke(dotenv.cli.list, [])
Toggle quote (1 lines)
> assert (result.exit_code, result.output) == (1, "")
E AssertionError: assert (-1, '') == (1, '')
E At index 0 diff: -1 != 1
E Use -v to get the full diff

tests/test_cli.py:31: AssertionError
__________________________ test_set_non_existent_file __________________________

cli = <click.testing.CliRunner object at 0x7ffff5f53cd0>

def test_set_non_existent_file(cli):
result = cli.invoke(dotenv.cli.set, ["a", "b"])
Toggle quote (1 lines)
> assert (result.exit_code, result.output) == (1, "")
E AssertionError: assert (-1, '') == (1, '')
E At index 0 diff: -1 != 1
E Use -v to get the full diff

tests/test_cli.py:113: AssertionError
=============================== warnings summary ===============================
tests/test_ipython.py::test_ipython_existing_variable_no_override
tests/test_ipython.py::test_ipython_existing_variable_override
tests/test_ipython.py::test_ipython_new_variable
/gnu/store/m6wza0kv26bnpfaavw8xs1gw2cls6369-python-ipython-7.9.0/lib/python3.8/site-packages/IPython/paths.py:67: UserWarning: IPython parent '/' is not a writable location, using a temp directory.
warn("IPython parent '{0}' is not a writable location,"

================== 2 failed, 130 passed, 3 warnings in 4.49s ===================
--
Sarah
S
S
Sarah Morgensen wrote on 4 Aug 2021 21:13
(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
86czqt2fce.fsf_-_@mgsn.dev
Hi,

Thanks again for your work on packaging this!

Giacomo Leidi <goodoldpaul@autistici.org> writes:

Toggle quote (4 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).

Toggle quote (1 lines)
> * gnu/packages/patches/dynaconf-Unvendor-dependencies.patch: New file.
^ an extra space slipped in here.
Toggle quote (279 lines)
> * local.mk (dist_patch_DATA): Register it.
> ---
> gnu/local.mk | 1 +
> .../dynaconf-Unvendor-dependencies.patch | 161 ++++++++++++++++++
> gnu/packages/python-xyz.scm | 95 +++++++++++
> 3 files changed, 257 insertions(+)
> create mode 100644 gnu/packages/patches/dynaconf-Unvendor-dependencies.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 9e8f2d702d..847137b77c 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -972,6 +972,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 b7e20d8358..f4f3b7fb3f 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)
> @@ -12473,6 +12474,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))
>
> @@ -26292,6 +26303,18 @@ Voronoi diagram.")
> 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")
> @@ -26315,3 +26338,75 @@ 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)))))
^ Nitpick: phases no longer have to end in #t, though it
doesn't hurt.

Toggle quote (25 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 :)

Toggle quote (2 lines)
> + (home-page
> + "https://github.com/rochacbruno/dynaconf")
^ Nitpick: this can go on one line
Toggle quote (2 lines)
> + (synopsis
> + "The dynamic configurator for your Python Project")
^ Likewise
Toggle quote (4 lines)
> + (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!

Toggle quote (1 lines)
> + (license license:expat)))
Toggle diff (36 lines)
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
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 49281
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch