From ee09db7e0dd7d50f5182f36f90af3304c7cf336f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 8 Apr 2025 16:50:43 -0700 Subject: [PATCH] python313Packages.dnspython: modernize --- .../python-modules/dnspython/default.nix | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/dnspython/default.nix b/pkgs/development/python-modules/dnspython/default.nix index f817d78437d4..469838fe4f2b 100644 --- a/pkgs/development/python-modules/dnspython/default.nix +++ b/pkgs/development/python-modules/dnspython/default.nix @@ -2,9 +2,7 @@ lib, aioquic, buildPythonPackage, - cacert, cryptography, - curio, fetchPypi, h2, httpcore, @@ -12,49 +10,35 @@ idna, hatchling, pytestCheckHook, - pythonOlder, - requests, - requests-toolbelt, - sniffio, trio, }: buildPythonPackage rec { pname = "dnspython"; version = "2.7.0"; - format = "pyproject"; - - disabled = pythonOlder "3.9"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-zpxDLtoNyRz2GKXO3xpOFCZRGWu80sgOie1akH5c+vE="; }; - nativeBuildInputs = [ hatchling ]; + build-system = [ hatchling ]; optional-dependencies = { - DOH = [ + doh = [ httpx h2 - requests - requests-toolbelt httpcore ]; - IDNA = [ idna ]; - DNSSEC = [ cryptography ]; + idna = [ idna ]; + dnssec = [ cryptography ]; trio = [ trio ]; - curio = [ - curio - sniffio - ]; - DOQ = [ aioquic ]; + doq = [ aioquic ]; }; nativeCheckInputs = [ pytestCheckHook ]; - checkInputs = [ cacert ] ++ optional-dependencies.DNSSEC; - disabledTests = [ # dns.exception.SyntaxError: protocol not found "test_misc_good_WKS_text" @@ -68,11 +52,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "dns" ]; - meta = with lib; { + meta = { description = "DNS toolkit for Python"; homepage = "https://www.dnspython.org"; changelog = "https://github.com/rthalley/dnspython/blob/v${version}/doc/whatsnew.rst"; - license = with licenses; [ isc ]; - maintainers = with maintainers; [ gador ]; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ gador ]; }; }