from __future__ import annotations

import os

from setuptools import find_packages
from setuptools import setup


def read(*names, **kwargs):
    """Read a file."""
    content = ""
    with open(
        os.path.join(os.path.dirname(__file__), *names),
        encoding=kwargs.get("encoding", "utf8"),
    ) as open_file:
        content = open_file.read().strip()
    return content


test_requirements = [
    "pytest",
    "pytest-cov",
    "pytest-xdist",
    "pytest-mock",
    "flake8",
    "pep8-naming",
    "flake8-debugger",
    "flake8-print",
    "flake8-todo",
    "radon",
    "flask>=0.12",
    "django",
    "python-dotenv",
    "toml",
    "redis",
    "hvac",
    "configobj",
]


setup(
    name="dynaconf",
    version=read("dynaconf", "VERSION"),
    url="https://github.com/dynaconf/dynaconf",
    license="MIT",
    license_files=["LICENSE", "vendor_licenses/*"],
    author="Bruno Rocha",
    author_email="rochacbruno@gmail.com",
    description="The dynamic configurator for your Python Project",
    long_description=read("README.md"),
    long_description_content_type="text/markdown",
    packages=find_packages(
        exclude=[
            "tests",
            "tests.*",
            "tests_functional",
            "tests_functional.*",
            "docs",
            "legacy_docs",
            "legacy_docs.*",
            "docs.*",
            "build",
            "build.*",
            "dynaconf.vendor_src",
            "dynaconf/vendor_src",
            "dynaconf.vendor_src.*",
            "dynaconf/vendor_src/*",
        ]
    ),
    include_package_data=True,
    zip_safe=False,
    platforms="any",
    tests_require=test_requirements,
    extras_require={
        "redis": ["redis"],
        "vault": ["hvac"],
        "yaml": ["ruamel.yaml"],
        "toml": ["toml"],
        "ini": ["configobj"],
        "configobj": ["configobj"],
        "all": ["redis", "ruamel.yaml", "configobj", "hvac"],
        "test": test_requirements,
    },
    python_requires=">=3.8",
    entry_points={"console_scripts": ["dynaconf=dynaconf.cli:main"]},
    setup_requires=["setuptools>=38.6.0"],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Django",
        "Framework :: Flask",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Utilities",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)

setup.py
from __future__ import annotations

import os

from setuptools import find_packages
from setuptools import setup


def read(*names, **kwargs):
    """Read a file."""
    content = ""
    with open(
        os.path.join(os.path.dirname(__file__), *names),
        encoding=kwargs.get("encoding", "utf8"),
    ) as open_file:
        content = open_file.read().strip()
    return content


test_requirements = [
    "pytest",
    "pytest-cov",
    "pytest-xdist",
    "pytest-mock",
    "flake8",
    "pep8-naming",
    "flake8-debugger",
    "flake8-print",
    "flake8-todo",
    "radon",
    "flask>=0.12",
    "django",
    "python-dotenv",
    "toml",
    "redis",
    "hvac>=1.1.0",
    "configobj",
]


setup(
    name="dynaconf",
    version=read("dynaconf", "VERSION"),
    url="https://github.com/dynaconf/dynaconf",
    license="MIT",
    license_files=["LICENSE", "vendor_licenses/*"],
    author="Bruno Rocha",
    author_email="rochacbruno@gmail.com",
    description="The dynamic configurator for your Python Project",
    long_description=read("README.md"),
    long_description_content_type="text/markdown",
    packages=find_packages(
        exclude=[
            "tests",
            "tests.*",
            "tests_functional",
            "tests_functional.*",
            "docs",
            "legacy_docs",
            "legacy_docs.*",
            "docs.*",
            "build",
            "build.*",
            "dynaconf.vendor_src",
            "dynaconf/vendor_src",
            "dynaconf.vendor_src.*",
            "dynaconf/vendor_src/*",
        ]
    ),
    include_package_data=True,
    zip_safe=False,
    platforms="any",
    tests_require=test_requirements,
    extras_require={
        "redis": ["redis"],
        "vault": ["hvac"],
        "yaml": ["ruamel.yaml"],
        "toml": ["toml"],
        "ini": ["configobj"],
        "configobj": ["configobj"],
        "all": ["redis", "ruamel.yaml", "configobj", "hvac"],
        "test": test_requirements,
    },
    python_requires=">=3.8",
    entry_points={"console_scripts": ["dynaconf=dynaconf.cli:main"]},
    setup_requires=["setuptools>=38.6.0"],
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Framework :: Django",
        "Framework :: Flask",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Utilities",
        "Topic :: Software Development :: Libraries",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
)

setup.py
diff --git a/setup.py b/setup.py
index 46f84939c..ac176672a 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,7 @@ def read(*names, **kwargs):
     "python-dotenv",
     "toml",
     "redis",
-    "hvac",
+    "hvac>=1.1.0",
     "configobj",
 ]
 

[bug] TypeError for older versions of HVAC in read_secret_version method
**Describe the bug**
A combination of newer versions of Dynaconf with older versions of HVAC result in an incompatible mix of expected vs available arguments. Specifically you can get the following traceback.

```python
    109 try:
    110     if obj.VAULT_KV_VERSION_FOR_DYNACONF == 2:
--> 111         data = client.secrets.kv.v2.read_secret_version(
    112             path,
    113             mount_point=obj.VAULT_MOUNT_POINT_FOR_DYNACONF,
    114             raise_on_deleted_version=True,  # keep default behavior
    115         )
    116     else:
    117         data = client.secrets.kv.read_secret(
    118             "data/" + path,
    119             mount_point=obj.VAULT_MOUNT_POINT_FOR_DYNACONF,
    120         )

TypeError: KvV2.read_secret_version() got an unexpected keyword argument 'raise_on_deleted_version'
```

The PR introducing this feature was included in HVAC 1.1.0: https://github.com/hvac/hvac/pull/907 

**To Reproduce**
Steps to reproduce the behavior:

1. Have a version of HVAC older than 1.1.0
2. Trigger a vault version read



