[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "dns-lexicon" version = "3.19.0" description = "Manipulate DNS records on various DNS providers in a standardized/agnostic way" license = "MIT" keywords = [ "dns", "lexicon", "dns-lexicon", "dehydrated", "letsencrypt", ] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Internet :: Name Service (DNS)", "Topic :: System :: Systems Administration", "Topic :: Utilities", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] authors = [ { name = "Jason Kulatunga", email = "[email protected]" }, { name = "Adrien Ferrand", email = "[email protected]" }, ] readme = "README.rst" requires-python = "< 3.14, >=3.9" dependencies = [ "tldextract >= 2", "cryptography >= 2", "pyyaml >= 3", "requests >= 2", "beautifulsoup4 >= 4", "pyotp >= 2", "dnspython >= 2", "importlib-metadata >= 4.6; python_version < '3.10'", ] [project.optional-dependencies] route53 = ["boto3 >= 1.28"] localzone = ["localzone >= 0.9.8"] softlayer = ["softlayer >= 5"] gransy = ["zeep >= 3"] oci = ["oci >= 2"] qcloud = ["tencentcloud-sdk-python >= 3"] full = [ "boto3 >= 1.28", "localzone >= 0.9.8", "softlayer >= 5", "zeep >= 3", "oci >= 2", "tencentcloud-sdk-python >= 3", ] [dependency-groups] dev = [ "esbonio", "packaging", "pytest", "pytest-cov", "pytest-xdist", "vcrpy", # We add flake8 conditionally to recent Python version to get modern versions # of flake8 cleaned of several issues. It just means that linting cannot be done # on the initial release of Python 3.8 (version 3.8.0). This is a decent constraint. "flake8; python_version >= '3.8.1'", "flake8-pyproject", "isort", "black", "mypy[reports]", "toml", "types-PyYAML", "types-requests", "types-toml", ] doc = [ "sphinx", "sphinx_rtd_theme", "toml", ] [project.scripts] lexicon = "lexicon._private.cli:main" [tool.hatch.build.targets.sdist] include = [ "/src" ] [tool.hatch.build.targets.wheel] packages = [ "src/lexicon" ] [tool.pytest.ini_options] junit_family = "xunit2" filterwarnings = [ # Fail for any warning, except... "error", # CGI, a transitive dependency for zeep (used by Gransy provider) # is deprecated. Let zeep manage that by Python 3.13. "ignore:'cgi' is deprecated:DeprecationWarning", # Ignore our own deprecation warnings. "ignore:Method execute\\(\\) is deprecated:DeprecationWarning", # Ignore deprecation warnings from datetime used by our third-party libraries. "ignore:.*datetime\\.utcnow\\(\\) is deprecated:DeprecationWarning", "ignore:.*datetime\\.utcfromtimestamp\\(\\) is deprecated:DeprecationWarning", # Ignore deprecation usages of urllib3 in boto "ignore:The 'strict' parameter is no longer needed on Python 3+:DeprecationWarning", ] [tool.mypy] show_error_codes = true warn_redundant_casts = true warn_unused_ignores = true [tool.isort] profile = "black" [tool.flake8] max-line-length = 88 extend-ignore = [ "E203", "E501" ] [tool.tox] envlist = [ "cover", "lint" , "mypy" ] [tool.tox.env_run_base] runner = "uv-venv-lock-runner" with_dev = true uv_sync_flags = [ "--python={env_python}" ] # Fix until https://github.com/tox-dev/tox-uv/issues/110 is fixed extras = [ "full" ] setenv.PYTEST_ADDOPTS = "--numprocesses auto" setenv.PYTHONHASHSEED = "0" commands = [[ "pytest", "tests/", "--junitxml=reports/test-results.xml", "--dist=loadfile", ]] # Cover env will run all test available for all providers with coverage enabled. [tool.tox.env.cover] commands = [[ "pytest", "tests/", "--junitxml=reports/test-results.xml", "--dist=loadfile", "--cov=lexicon", "--cov-report=term-missing", "--cov-report=xml", ]] # Light env will run all tests except for providers with optional dependencies. [tool.tox.env.light] extras = [] commands = [[ "pytest", "tests/", "--junitxml=reports/test-results.xml", "--dist=loadfile", "--xfail-providers-with-missing-deps", ]] # Lint env will check for code quality and errors, and fails if it does not match the minimal requirements. [tool.tox.env.lint] commands = [[ "flake8", "src", "tests", ]] # Mypy env will check for types in the Lexicon codebase. [tool.tox.env.mypy] commands = [[ "mypy", "src", "tests", "--xml-report=reports" ]]