mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: dynaconf: Update to 3.2.11.
* gnu/packages/python-xyz.scm (dynaconf) [source]: Remove <patches>, handle these substitutions in <snippet>. Re-vendor python-dotenv. [arguments]: Improve style. <#:test-flags>: Add failing click test. [propagated-inputs]: Remove python-dotenv-0.13.0. [native-inputs]: Remove python-wheel. * gnu/packages/patches/dynaconf-unvendor-deps.patch: Remove patch. * gnu/local.mk: De-register patch. Change-Id: Ie3630a754d592e364742ddbebe7f4b3570e73f85 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
fe8da9319f
commit
7ada11443f
3 changed files with 37 additions and 199 deletions
|
@ -1195,7 +1195,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/durden-shadow-arcan.patch \
|
||||
%D%/packages/patches/dvd+rw-tools-add-include.patch \
|
||||
%D%/packages/patches/dwarves-threading-reproducibility.patch \
|
||||
%D%/packages/patches/dynaconf-unvendor-deps.patch \
|
||||
%D%/packages/patches/efivar-fix-fprint-format.patch \
|
||||
%D%/packages/patches/eigen-fix-strict-aliasing-bug.patch \
|
||||
%D%/packages/patches/einstein-build.patch \
|
||||
|
|
|
@ -1,169 +0,0 @@
|
|||
From d3252748b0f9036cb31f4697ebb5c6a494aceaca Mon Sep 17 00:00:00 2001
|
||||
From: Giacomo Leidi <goodoldpaul@autistici.org>
|
||||
Date: Sun, 14 Jan 2024 12:05:49 +0100
|
||||
Subject: [PATCH] Use system site dependencies.
|
||||
|
||||
* Box was not unvendored because it appears to be heavily patched.
|
||||
* Tomllib seems to be a backport from Python 3.11, as such it wasn't unvendored.
|
||||
---
|
||||
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/inspect.py | 2 +-
|
||||
dynaconf/utils/parse_conf.py | 2 +-
|
||||
dynaconf/vendor/box/converters.py | 2 +-
|
||||
dynaconf/vendor/box/from_file.py | 2 +-
|
||||
tests/test_cli.py | 2 +-
|
||||
tests/test_inspect.py | 2 +-
|
||||
11 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dynaconf/cli.py b/dynaconf/cli.py
|
||||
index c0fd489..5739e79 100644
|
||||
--- a/dynaconf/cli.py
|
||||
+++ b/dynaconf/cli.py
|
||||
@@ -24,8 +24,8 @@ from dynaconf.utils.parse_conf import parse_conf_data
|
||||
from dynaconf.utils.parse_conf import unparse_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
|
||||
from dynaconf.vendor import tomllib
|
||||
|
||||
|
||||
diff --git a/dynaconf/default_settings.py b/dynaconf/default_settings.py
|
||||
index 7e8c222..526b01e 100644
|
||||
--- a/dynaconf/default_settings.py
|
||||
+++ b/dynaconf/default_settings.py
|
||||
@@ -11,7 +11,7 @@ from dynaconf.utils import warn_deprecations
|
||||
from dynaconf.utils.files import find_file
|
||||
from dynaconf.utils.parse_conf import boolean_fix
|
||||
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 a563b4e..91ac3ae 100644
|
||||
--- a/dynaconf/loaders/env_loader.py
|
||||
+++ b/dynaconf/loaders/env_loader.py
|
||||
@@ -11,7 +11,7 @@ from dynaconf.utils.parse_conf import parse_conf_data
|
||||
|
||||
DOTENV_IMPORTED = False
|
||||
with suppress(ImportError, FileNotFoundError):
|
||||
- from dynaconf.vendor.dotenv import cli as dotenv_cli
|
||||
+ from dotenv import cli as dotenv_cli
|
||||
|
||||
DOTENV_IMPORTED = True
|
||||
|
||||
diff --git a/dynaconf/loaders/toml_loader.py b/dynaconf/loaders/toml_loader.py
|
||||
index 42db7b3..ba0188b 100644
|
||||
--- a/dynaconf/loaders/toml_loader.py
|
||||
+++ b/dynaconf/loaders/toml_loader.py
|
||||
@@ -7,7 +7,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 # Backwards compatibility with uiri/toml
|
||||
+import toml # Backwards compatibility with uiri/toml
|
||||
from dynaconf.vendor import tomllib # New tomllib stdlib on py3.11
|
||||
|
||||
|
||||
diff --git a/dynaconf/loaders/yaml_loader.py b/dynaconf/loaders/yaml_loader.py
|
||||
index 5721681..ab628c2 100644
|
||||
--- a/dynaconf/loaders/yaml_loader.py
|
||||
+++ b/dynaconf/loaders/yaml_loader.py
|
||||
@@ -10,7 +10,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/inspect.py b/dynaconf/utils/inspect.py
|
||||
index 21d724e..2933b8f 100644
|
||||
--- a/dynaconf/utils/inspect.py
|
||||
+++ b/dynaconf/utils/inspect.py
|
||||
@@ -18,7 +18,7 @@ from dynaconf.loaders.base import SourceMetadata
|
||||
from dynaconf.utils.boxing import DynaBox
|
||||
from dynaconf.utils.functional import empty
|
||||
from dynaconf.vendor.box.box_list import BoxList
|
||||
-from dynaconf.vendor.ruamel.yaml import YAML
|
||||
+from ruamel.yaml import YAML
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from dynaconf.base import LazySettings, Settings
|
||||
diff --git a/dynaconf/utils/parse_conf.py b/dynaconf/utils/parse_conf.py
|
||||
index 882110e..a262864 100644
|
||||
--- a/dynaconf/utils/parse_conf.py
|
||||
+++ b/dynaconf/utils/parse_conf.py
|
||||
@@ -12,7 +12,7 @@ from dynaconf.utils import multi_replace
|
||||
from dynaconf.utils import recursively_evaluate_lazy_format
|
||||
from dynaconf.utils.boxing import DynaBox
|
||||
from dynaconf.utils.functional import empty
|
||||
-from dynaconf.vendor import toml
|
||||
+import toml
|
||||
from dynaconf.vendor import tomllib
|
||||
|
||||
try:
|
||||
diff --git a/dynaconf/vendor/box/converters.py b/dynaconf/vendor/box/converters.py
|
||||
index 08694fe..4e84930 100644
|
||||
--- a/dynaconf/vendor/box/converters.py
|
||||
+++ b/dynaconf/vendor/box/converters.py
|
||||
@@ -9,7 +9,7 @@ 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 tomllib as toml
|
||||
|
||||
diff --git a/dynaconf/vendor/box/from_file.py b/dynaconf/vendor/box/from_file.py
|
||||
index a82ac96..cd01f13 100644
|
||||
--- a/dynaconf/vendor/box/from_file.py
|
||||
+++ b/dynaconf/vendor/box/from_file.py
|
||||
@@ -4,7 +4,7 @@ from json import JSONDecodeError
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
from dynaconf.vendor.tomllib import TOMLDecodeError
|
||||
-from dynaconf.vendor.ruamel.yaml import YAMLError
|
||||
+from ruamel.yaml import YAMLError
|
||||
|
||||
|
||||
from .exceptions import BoxError
|
||||
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||
index c679ae5..9df5f7f 100644
|
||||
--- a/tests/test_cli.py
|
||||
+++ b/tests/test_cli.py
|
||||
@@ -15,7 +15,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
|
||||
|
||||
settings = LazySettings(OPTION_FOR_TESTS=True, environments=True)
|
||||
|
||||
diff --git a/tests/test_inspect.py b/tests/test_inspect.py
|
||||
index 0819715..96638c1 100644
|
||||
--- a/tests/test_inspect.py
|
||||
+++ b/tests/test_inspect.py
|
||||
@@ -18,7 +18,7 @@ from dynaconf.utils.inspect import inspect_settings
|
||||
from dynaconf.utils.inspect import KeyNotFoundError
|
||||
from dynaconf.utils.inspect import OutputFormatError
|
||||
from dynaconf.validator import Validator
|
||||
-from dynaconf.vendor.ruamel import yaml
|
||||
+from ruamel import yaml
|
||||
|
||||
|
||||
def create_file(filename: str, data: str) -> str:
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -37378,49 +37378,57 @@ Python @code{set} interface.")
|
|||
(define-public dynaconf
|
||||
(package
|
||||
(name "dynaconf")
|
||||
(version "3.2.4")
|
||||
(version "3.2.11")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri
|
||||
(git-reference
|
||||
(url "https://github.com/dynaconf/dynaconf")
|
||||
(commit version)))
|
||||
(url "https://github.com/dynaconf/dynaconf")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0fj2ffvzfvjf4d7f672h5x5fzq26f8hax9j3dfsix158fwm0212w"))
|
||||
(patches (search-patches "dynaconf-unvendor-deps.patch"))
|
||||
(base32 "05122x1bwskfqnzi9hqi86h7407byfjvhgczj74x6lp2m6rnwkzl"))
|
||||
;; (patches (search-patches "dynaconf-unvendor-deps.patch"))
|
||||
(modules '((guix build utils)))
|
||||
;; Remove vendored dependencies
|
||||
(snippet '(let ((unvendor '("click" "dotenv" "ruamel" "toml")))
|
||||
(with-directory-excursion "dynaconf/vendor"
|
||||
(for-each delete-file-recursively unvendor))))))
|
||||
(snippet
|
||||
#~(let ((unvendor '("click" "ruamel" "toml")))
|
||||
(with-directory-excursion "dynaconf/vendor"
|
||||
(for-each delete-file-recursively unvendor))
|
||||
(substitute* (find-files "." "\\.py$")
|
||||
(("from dynaconf\\.vendor import (click|ruamel|toml)([^l]+.*)$"
|
||||
_ target rest)
|
||||
(string-append "import " target rest))
|
||||
(("dynaconf\\.vendor\\.(click|ruamel|toml)" _ target)
|
||||
target))))))
|
||||
(build-system pyproject-build-system)
|
||||
(arguments
|
||||
`(#:test-flags
|
||||
'("--ignore=tests/test_vault.py" ; depend on hvac and a live Vault
|
||||
"-k" ,(let ((click-tests '("test_negative_get"
|
||||
"test_inspect_invalid_format")))
|
||||
;; Disable integration tests
|
||||
(string-append "not integration and not "
|
||||
;; These tests fail because we use Click 8.*
|
||||
;; instead of Click 7
|
||||
(string-join click-tests " and not ")))
|
||||
"tests")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-for-click-8
|
||||
(lambda _
|
||||
(substitute* "dynaconf/cli.py"
|
||||
(("click.get_os_args\\()") ;deprecated from Click 8.1+
|
||||
"sys.argv[1:]")))))))
|
||||
(list
|
||||
#:test-flags
|
||||
#~(list "--ignore=tests/test_vault.py" ; depend on hvac and a live Vault
|
||||
"-k" #$(let ((click-tests '("test_negative_get"
|
||||
"test_not_found_key_exit_error[get]"
|
||||
"test_inspect_invalid_format")))
|
||||
;; Disable integration tests
|
||||
(string-append "not integration and not "
|
||||
;; These tests fail because we use
|
||||
;; Click 8.* instead of Click 7
|
||||
(string-join click-tests " and not ")))
|
||||
"tests")
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-for-click-8
|
||||
(lambda _
|
||||
(substitute* "dynaconf/cli.py"
|
||||
(("click.get_os_args\\()") ;deprecated from Click 8.1+
|
||||
"sys.argv[1:]")))))))
|
||||
(propagated-inputs
|
||||
(list python-click python-configobj python-dotenv-0.13.0
|
||||
python-ruamel.yaml-0.16 python-toml python-tomli))
|
||||
(list python-click python-configobj python-ruamel.yaml-0.16
|
||||
python-toml python-tomli))
|
||||
(native-inputs
|
||||
(list python-django python-flask python-pytest python-pytest-cov
|
||||
python-pytest-mock python-setuptools python-wheel))
|
||||
python-pytest-mock python-setuptools))
|
||||
(home-page "https://www.dynaconf.com/")
|
||||
(synopsis "The dynamic configurator for your Python project")
|
||||
(description
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue