From 240a2d51eff17b9ea5b3ce342697ff47bdd6c84c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 30 Jan 2023 14:17:36 +0100 Subject: [PATCH] python310Packages.dnspython: 2.2.1 -> 2.3.0 Changelog: https://github.com/rthalley/dnspython/blob/v2.3.0/doc/whatsnew.rst --- .../python-modules/dnspython/default.nix | 63 +++++++++++++++---- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/dnspython/default.nix b/pkgs/development/python-modules/dnspython/default.nix index a480ab8556b7..30a220fd6da8 100644 --- a/pkgs/development/python-modules/dnspython/default.nix +++ b/pkgs/development/python-modules/dnspython/default.nix @@ -1,11 +1,21 @@ { lib , stdenv +, aioquic , buildPythonPackage -, fetchPypi -, pythonOlder -, setuptools-scm -, pytestCheckHook , cacert +, cryptography +, curio +, fetchPypi +, h2 +, httpx +, idna +, pytestCheckHook +, pythonOlder +, requests +, requests-toolbelt +, setuptools-scm +, sniffio +, trio }: buildPythonPackage rec { @@ -13,17 +23,49 @@ buildPythonPackage rec { version = "2.3.0"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - extension = "tar.gz"; hash = "sha256-Ik4ysD60a+cOEu9tZOC+Ejpk5iGrTAgi/21FDVKlQLk="; }; + nativeBuildInputs = [ + setuptools-scm + ]; + + passthru.optional-dependencies = { + DOH = [ + httpx + h2 + requests + requests-toolbelt + ]; + IDNA = [ + idna + ]; + DNSSEC = [ + cryptography + ]; + trio = [ + trio + ]; + curio = [ + curio + sniffio + ]; + DOQ = [ + aioquic + ]; + }; + nativeCheckInputs = [ pytestCheckHook - ] ++ lib.optionals stdenv.isDarwin [ + ]; + + checkInputs = [ + ] ++ passthru.optional-dependencies.DNSSEC + ++ lib.optionals stdenv.isDarwin [ cacert ]; @@ -32,9 +74,8 @@ buildPythonPackage rec { "test_misc_good_WKS_text" # fails if IPv6 isn't available "test_resolver_override" - - # Tests that run inconsistently on darwin systems ] ++ lib.optionals stdenv.isDarwin [ + # Tests that run inconsistently on darwin systems # 9 tests fail with: BlockingIOError: [Errno 35] Resource temporarily unavailable "testQueryUDP" # 6 tests fail with: dns.resolver.LifetimeTimeout: The resolution lifetime expired after ... @@ -42,10 +83,6 @@ buildPythonPackage rec { "testResolveTCP" ]; - nativeBuildInputs = [ - setuptools-scm - ]; - pythonImportsCheck = [ "dns" ];