aboutsummaryrefslogtreecommitdiff
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