From 72c6128cdca8a8785f1558dc54ab8587df31433b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 26 Nov 2023 10:18:46 +0100 Subject: [PATCH 1/5] python311Packages.tldextract: 5.1.0 -> 5.1.1 Diff: https://github.com/john-kurkowski/tldextract/compare/refs/tags/5.1.0...5.1.1 Changelog: https://github.com/john-kurkowski/tldextract/blob/5.1.1/CHANGELOG.md --- pkgs/development/python-modules/tldextract/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tldextract/default.nix b/pkgs/development/python-modules/tldextract/default.nix index 7788bd00fb05..58dffe94a66b 100644 --- a/pkgs/development/python-modules/tldextract/default.nix +++ b/pkgs/development/python-modules/tldextract/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "tldextract"; - version = "5.1.0"; + version = "5.1.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "john-kurkowski"; repo = "tldextract"; rev = "refs/tags/${version}"; - hash = "sha256-x5SJcbTUrqG7mMUPXIhR1rEu3PZ+VA00dFYeoGnX5l0="; + hash = "sha256-/VBbU8FuB8MEuX6MgGO44+gfqVjl1aHHDHncHY2Jo38="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; From 1224c9fe3170e179a9f7391d488e0ce1ffb3a98d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 26 Nov 2023 16:06:17 +0100 Subject: [PATCH 2/5] python311Packages.warcio: add changelog to meta --- pkgs/development/python-modules/warcio/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/warcio/default.nix b/pkgs/development/python-modules/warcio/default.nix index 935a538222bd..8e38db90050e 100644 --- a/pkgs/development/python-modules/warcio/default.nix +++ b/pkgs/development/python-modules/warcio/default.nix @@ -50,6 +50,7 @@ buildPythonPackage rec { meta = with lib; { description = "Streaming WARC/ARC library for fast web archive IO"; homepage = "https://github.com/webrecorder/warcio"; + changelog = "https://github.com/webrecorder/warcio/blob/master/CHANGELIST.rst"; license = licenses.asl20; maintainers = with maintainers; [ Luflosi ]; }; From 7e8ae9222a96a248d75f19e95c84c1e7b2d0669d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 26 Nov 2023 16:07:41 +0100 Subject: [PATCH 3/5] python311Packages.warcio: add format - disable on unsupported Python releases --- pkgs/development/python-modules/warcio/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/warcio/default.nix b/pkgs/development/python-modules/warcio/default.nix index 8e38db90050e..3f29153c0a10 100644 --- a/pkgs/development/python-modules/warcio/default.nix +++ b/pkgs/development/python-modules/warcio/default.nix @@ -9,11 +9,15 @@ , requests , wsgiprox , multidict +, pythonOlder }: buildPythonPackage rec { pname = "warcio"; version = "1.7.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "webrecorder"; From 841819b8db2a7ffb45cd81484cb312b17ee67534 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 26 Nov 2023 16:09:03 +0100 Subject: [PATCH 4/5] python311Packages.warcio: refactor --- .../python-modules/warcio/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/warcio/default.nix b/pkgs/development/python-modules/warcio/default.nix index 3f29153c0a10..47af36478133 100644 --- a/pkgs/development/python-modules/warcio/default.nix +++ b/pkgs/development/python-modules/warcio/default.nix @@ -2,14 +2,14 @@ , buildPythonPackage , fetchFromGitHub , fetchpatch -, six -, setuptools -, pytestCheckHook , httpbin -, requests -, wsgiprox , multidict +, pytestCheckHook , pythonOlder +, requests +, setuptools +, six +, wsgiprox }: buildPythonPackage rec { @@ -40,16 +40,20 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytestCheckHook httpbin + multidict # Optional. Without this, one test in test/test_utils.py is skipped. + pytestCheckHook requests wsgiprox - multidict # Optional. Without this, one test in test/test_utils.py is skipped. ]; - pytestFlagsArray = [ "--offline" ]; + pytestFlagsArray = [ + "--offline" + ]; - pythonImportsCheck = [ "warcio" ]; + pythonImportsCheck = [ + "warcio" + ]; meta = with lib; { description = "Streaming WARC/ARC library for fast web archive IO"; From 693b4d904a1e98daaa9df3a5734f0a9e891b0345 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 26 Nov 2023 16:12:13 +0100 Subject: [PATCH 5/5] python311Packages.warcio: disable failing test --- pkgs/development/python-modules/warcio/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/warcio/default.nix b/pkgs/development/python-modules/warcio/default.nix index 47af36478133..fe9f7bdeb0f1 100644 --- a/pkgs/development/python-modules/warcio/default.nix +++ b/pkgs/development/python-modules/warcio/default.nix @@ -28,6 +28,7 @@ buildPythonPackage rec { patches = [ (fetchpatch { + # Add offline mode to skip tests that require an internet connection, https://github.com/webrecorder/warcio/pull/135 name = "add-offline-option.patch"; url = "https://github.com/webrecorder/warcio/pull/135/commits/2546fe457c57ab0b391764a4ce419656458d9d07.patch"; hash = "sha256-3izm9LvAeOFixiIUUqmd5flZIxH92+NxL7jeu35aObQ="; @@ -51,6 +52,11 @@ buildPythonPackage rec { "--offline" ]; + disabledTests = [ + # Tests require network access, see above + "test_get_cache_to_file" + ]; + pythonImportsCheck = [ "warcio" ];