From f69ae5339de7d0438fdfcae6d2bd49fc1faf38fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 13:34:56 +0100 Subject: [PATCH 01/10] python313Packages.dateparser: 1.2.0 -> 1.2.1 Diff: https://github.com/scrapinghub/dateparser/compare/refs/tags/v1.2.0...v1.2.1 Changelog: https://github.com/scrapinghub/dateparser/blob/refs/tags/v1.2.1/HISTORY.rst --- pkgs/development/python-modules/dateparser/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dateparser/default.nix b/pkgs/development/python-modules/dateparser/default.nix index 2ee14891dbda..87f08f29a55f 100644 --- a/pkgs/development/python-modules/dateparser/default.nix +++ b/pkgs/development/python-modules/dateparser/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "dateparser"; - version = "1.2.0"; + version = "1.2.1"; disabled = pythonOlder "3.7"; @@ -32,7 +32,7 @@ buildPythonPackage rec { owner = "scrapinghub"; repo = "dateparser"; tag = "v${version}"; - hash = "sha256-mnL44hojebOwP6qtEBHs5QM4uRmLuGlVNr+sM3jZEKE="; + hash = "sha256-O0FsLWbH0kGjwGCTklBMVVqosxXlXRyS9aAcggtBLsA="; }; nativeBuildInputs = [ setuptools ]; From 179571d830f3461121212982cb83fdbce5acf82b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 15:20:23 +0100 Subject: [PATCH 02/10] python312Packages.secure: refactor - enable tests - update disabled - update build-system - add changelog to meta --- .../python-modules/secure/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/secure/default.nix b/pkgs/development/python-modules/secure/default.nix index 1e4cd09e58b1..982e53783f92 100644 --- a/pkgs/development/python-modules/secure/default.nix +++ b/pkgs/development/python-modules/secure/default.nix @@ -2,37 +2,42 @@ lib, buildPythonPackage, fetchFromGitHub, - isPy27, maya, + pythonOlder, requests, + pytestCheckHook, + setuptools, }: buildPythonPackage rec { - version = "1.0.1"; - format = "setuptools"; pname = "secure"; - disabled = isPy27; + version = "1.0.1"; + pyproject = true; + + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "typeerror"; repo = "secure.py"; tag = "v${version}"; - sha256 = "sha256-lyosOejztFEINGKO0wAYv3PWBL7vpmAq+eQunwP9h5I="; + hash = "sha256-lyosOejztFEINGKO0wAYv3PWBL7vpmAq+eQunwP9h5I="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ maya requests ]; - # no tests in release - doCheck = false; + nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "secure" ]; meta = with lib; { description = "Adds optional security headers and cookie attributes for Python web frameworks"; homepage = "https://github.com/TypeError/secure.py"; + changelog = "https://github.com/TypeError/secure/releases/tag/v${version}"; license = licenses.mit; maintainers = [ ]; }; From 52dbf8edffd2c3af7fea998402cf5c0a089f612e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 15:28:25 +0100 Subject: [PATCH 03/10] python312Packages.trafilatura: disable failing test - update postPatch section --- pkgs/development/python-modules/trafilatura/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/trafilatura/default.nix b/pkgs/development/python-modules/trafilatura/default.nix index ed68972ac89d..ecbad785b0f1 100644 --- a/pkgs/development/python-modules/trafilatura/default.nix +++ b/pkgs/development/python-modules/trafilatura/default.nix @@ -26,11 +26,8 @@ buildPythonPackage rec { hash = "sha256-zrcJSm7Ml+cv6nPH26NnFMXFtXe2Rw5FINyok3BtYkc="; }; - # Patch out gui cli because it is not supported in this packaging and - # nixify path to the trafilatura binary in the test suite postPatch = '' - substituteInPlace setup.py \ - --replace-fail '"trafilatura_gui=trafilatura.gui:main",' "" + # nixify path to the trafilatura binary in the test suite substituteInPlace tests/cli_tests.py \ --replace-fail 'trafilatura_bin = "trafilatura"' \ 'trafilatura_bin = "${placeholder "out"}/bin/trafilatura"' @@ -57,6 +54,7 @@ buildPythonPackage rec { "test_download" "test_feeds_helpers" "test_fetch" + "test_input_type" "test_is_live_page" "test_meta_redirections" "test_probing" From 3c463d5d94d8df10413a4bb9dfbf5a8b25a689fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 17:47:45 +0100 Subject: [PATCH 04/10] python313Packages.python-binance: disable failing tests --- .../python-modules/python-binance/default.nix | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/python-binance/default.nix b/pkgs/development/python-modules/python-binance/default.nix index 9d7f575ebd0f..4785b79d2195 100644 --- a/pkgs/development/python-modules/python-binance/default.nix +++ b/pkgs/development/python-modules/python-binance/default.nix @@ -1,15 +1,16 @@ { lib, aiohttp, + aioresponses, buildPythonPackage, dateparser, fetchFromGitHub, - fetchpatch, pycryptodome, + pytest-asyncio, pytestCheckHook, pythonOlder, - requests, requests-mock, + requests, six, ujson, websockets, @@ -29,14 +30,6 @@ buildPythonPackage rec { hash = "sha256-nsJuHxPXhMBRY4BUDDLj5sHK/GuJA0pBU3RGUDxVm50="; }; - patches = [ - (fetchpatch { - name = "fix-unable-to-determine-version-error.patch"; - url = "https://github.com/sammchardy/python-binance/commit/1b9dd4853cafccf6cdacc13bb64a18632a79a6f1.patch"; - hash = "sha256-6KRHm2cZRcdD6qMdRAwlea4qLZ1/1YFzZAQ7Ph4XMCs="; - }) - ]; - propagatedBuildInputs = [ aiohttp dateparser @@ -48,6 +41,8 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + aioresponses + pytest-asyncio pytestCheckHook requests-mock ]; @@ -55,7 +50,30 @@ buildPythonPackage rec { disabledTestPaths = [ # Tests require network access "tests/test_api_request.py" - "tests/test_historical_klines.py" + "tests/test_async_client.py" + "tests/test_async_client_futures.py" + "tests/test_async_client_margin.py" + "tests/test_async_client_options.py" + "tests/test_async_client_portfolio.py" + "tests/test_async_client_ws_api.py" + "tests/test_async_client_ws_futures_requests.py" + "tests/test_client.py" + "tests/test_client_futures.py" + "tests/test_client_gift_card.py" + "tests/test_client_margin.py" + "tests/test_client_options.py" + "tests/test_client_portfolio.py" + "tests/test_client_ws_api.py" + "tests/test_client_ws_futures_requests.py" + "tests/test_depth_cache.py" + "tests/test_get_order_book.py" + "tests/test_ping.py" + "tests/test_reconnecting_websocket.py" + "tests/test_socket_manager.py" + "tests/test_streams.py" + "tests/test_threaded_socket_manager.py" + "tests/test_threaded_stream.py" + "tests/test_ws_api.py" ]; pythonImportsCheck = [ "binance" ]; From 52b40d9a9767ce964b7cc47e1492db82f799f66d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 17:49:56 +0100 Subject: [PATCH 05/10] python313Packages.python-binance: refactor --- .../python-modules/python-binance/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/python-binance/default.nix b/pkgs/development/python-modules/python-binance/default.nix index 4785b79d2195..77db7394f7e1 100644 --- a/pkgs/development/python-modules/python-binance/default.nix +++ b/pkgs/development/python-modules/python-binance/default.nix @@ -13,24 +13,27 @@ requests, six, ujson, + setuptools, websockets, }: buildPythonPackage rec { pname = "python-binance"; version = "1.0.27"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.11"; src = fetchFromGitHub { owner = "sammchardy"; - repo = pname; + repo = "python-binance"; tag = "v${version}"; hash = "sha256-nsJuHxPXhMBRY4BUDDLj5sHK/GuJA0pBU3RGUDxVm50="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ aiohttp dateparser requests From 78c4b63c859cc46890ed6610d8617bb998a158db Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 5 Feb 2025 11:27:46 +0100 Subject: [PATCH 06/10] python312Packages.w3lib: 2.2.1 -> 2.3.1 Changelog: https://github.com/scrapy/w3lib/blob/v2.3.1/NEWS --- pkgs/development/python-modules/w3lib/default.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/w3lib/default.nix b/pkgs/development/python-modules/w3lib/default.nix index 99a336319abc..e0cfe29155a0 100644 --- a/pkgs/development/python-modules/w3lib/default.nix +++ b/pkgs/development/python-modules/w3lib/default.nix @@ -1,7 +1,6 @@ { lib, buildPythonPackage, - fetchpatch, fetchPypi, pytestCheckHook, pythonOlder, @@ -10,23 +9,16 @@ buildPythonPackage rec { pname = "w3lib"; - version = "2.2.1"; + version = "2.3.1"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; - hash = "sha256-dW/y2Uxk5ByNfAxZ/qEqXQvFXjOlMceYi0oWPeubB90="; + hash = "sha256-XIrAKjAnV2F0wrYeuaIXC6Gxl8rnZwgHcbbx/r2iSaQ="; }; - patches = [ - (fetchpatch { - url = "https://github.com/scrapy/w3lib/commit/44dcf9160c3f207658d6ce808307c80c9ca835a2.patch"; - hash = "sha256-fUQ2oWpAJeslgemt+EUxKLH3Ywpg441FCOBLFJCZ+Ac="; - }) - ]; - build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; From 9c9f5b10faefac1d6b1bca3df5f2dff8a2da57d0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 5 Feb 2025 11:28:20 +0100 Subject: [PATCH 07/10] python312Packages.playwrightcapture: 1.27.6 -> 1.27.7 Diff: https://github.com/Lookyloo/PlaywrightCapture/compare/refs/tags/v1.27.6...v1.27.7 Changelog: https://github.com/Lookyloo/PlaywrightCapture/releases/tag/v1.27.7 --- pkgs/development/python-modules/playwrightcapture/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/playwrightcapture/default.nix b/pkgs/development/python-modules/playwrightcapture/default.nix index d86427837f0e..c1f4dee4c766 100644 --- a/pkgs/development/python-modules/playwrightcapture/default.nix +++ b/pkgs/development/python-modules/playwrightcapture/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "playwrightcapture"; - version = "1.27.6"; + version = "1.27.7"; pyproject = true; disabled = pythonOlder "3.9"; @@ -31,7 +31,7 @@ buildPythonPackage rec { owner = "Lookyloo"; repo = "PlaywrightCapture"; tag = "v${version}"; - hash = "sha256-Kh4F5dicbVvM9k8T4iMERMuze3Ztawi9LXH7+udtZFU="; + hash = "sha256-tu1QvurhJBW6tygdteQYAWWk9nuEHT7p8LlkmTwW+Dw="; }; pythonRelaxDeps = [ From ec5e69d9d5de78deea083c2676525e53e8864816 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 5 Feb 2025 11:29:02 +0100 Subject: [PATCH 08/10] python312Packages.lacuscore: 1.12.8 -> 1.12.9 Diff: https://github.com/ail-project/LacusCore/compare/refs/tags/v1.12.8...v1.12.9 Changelog: https://github.com/ail-project/LacusCore/releases/tag/v1.12.9 --- pkgs/development/python-modules/lacuscore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/lacuscore/default.nix b/pkgs/development/python-modules/lacuscore/default.nix index 46bdab1780c3..44e57f8f4267 100644 --- a/pkgs/development/python-modules/lacuscore/default.nix +++ b/pkgs/development/python-modules/lacuscore/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "lacuscore"; - version = "1.12.8"; + version = "1.12.9"; pyproject = true; disabled = pythonOlder "3.9"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "ail-project"; repo = "LacusCore"; tag = "v${version}"; - hash = "sha256-blQhnQoNMXQhNQJ7EXawoYHxbPEgPmLltoLQTzsKwtA="; + hash = "sha256-kh/INvFeSDvvhzryhkSzgtTsIIh4YF6FjDxjUG0hz6E="; }; pythonRelaxDeps = [ From ac99f9ef91413ebc7d788128cc4a5363fb18b4f1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 20:39:01 +0100 Subject: [PATCH 09/10] python312Packages.playwrightcapture: 1.27.7 -> 1.27.8 Diff: https://github.com/Lookyloo/PlaywrightCapture/compare/refs/tags/v1.27.7...v1.27.8 Changelog: https://github.com/Lookyloo/PlaywrightCapture/releases/tag/v1.27.8 --- pkgs/development/python-modules/playwrightcapture/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/playwrightcapture/default.nix b/pkgs/development/python-modules/playwrightcapture/default.nix index c1f4dee4c766..10495f4898c4 100644 --- a/pkgs/development/python-modules/playwrightcapture/default.nix +++ b/pkgs/development/python-modules/playwrightcapture/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "playwrightcapture"; - version = "1.27.7"; + version = "1.27.8"; pyproject = true; disabled = pythonOlder "3.9"; @@ -31,7 +31,7 @@ buildPythonPackage rec { owner = "Lookyloo"; repo = "PlaywrightCapture"; tag = "v${version}"; - hash = "sha256-tu1QvurhJBW6tygdteQYAWWk9nuEHT7p8LlkmTwW+Dw="; + hash = "sha256-iIUwBX3MQHeEmYwesW2Dm45tr9FYyq9GtLGbyV784RA="; }; pythonRelaxDeps = [ From b600aa2823098ff7096e21c31583b12d85cdc5b0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Feb 2025 20:53:27 +0100 Subject: [PATCH 10/10] python312Packages.lacuscore: 1.12.9 -> 1.12.10 Diff: https://github.com/ail-project/LacusCore/compare/refs/tags/v1.12.9...v1.12.10 Changelog: https://github.com/ail-project/LacusCore/releases/tag/v1.12.10 --- pkgs/development/python-modules/lacuscore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/lacuscore/default.nix b/pkgs/development/python-modules/lacuscore/default.nix index 44e57f8f4267..1fd803cbbd99 100644 --- a/pkgs/development/python-modules/lacuscore/default.nix +++ b/pkgs/development/python-modules/lacuscore/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "lacuscore"; - version = "1.12.9"; + version = "1.12.10"; pyproject = true; disabled = pythonOlder "3.9"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "ail-project"; repo = "LacusCore"; tag = "v${version}"; - hash = "sha256-kh/INvFeSDvvhzryhkSzgtTsIIh4YF6FjDxjUG0hz6E="; + hash = "sha256-IKH7c1/MgjlfJ9tKVeTXW8MdLIc7P+jitvQkZn9f75Y="; }; pythonRelaxDeps = [