From 38e1362d4a532a161a94f53e4e418ce59af31aa5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 18 Aug 2024 04:02:42 +0000 Subject: [PATCH 1/3] python312Packages.sanic: 23.12.1 -> 24.6.0 --- pkgs/development/python-modules/sanic/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 8885c4951dd3..94cc8ba3f38d 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { pname = "sanic"; - version = "23.12.1"; + version = "24.6.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -47,7 +47,7 @@ buildPythonPackage rec { owner = "sanic-org"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-TizjibqoLNMX0m5oPyncKgFnltXOLZUIPSzVIeKU25w="; + hash = "sha256-AviYqdr+r5ya4mFJKGUatBsaMMmCQGqE3YtDJwTuaY0="; }; nativeBuildInputs = [ From 43ea7fe77270c246c65e493d62c2265a06ab559a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Aug 2024 10:54:40 +0200 Subject: [PATCH 2/3] python312Packages.sanic: refactor --- .../python-modules/sanic/default.nix | 58 ++++++++----------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 94cc8ba3f38d..04f00668ed92 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -1,61 +1,48 @@ { lib, stdenv, - buildPythonPackage, - fetchFromGitHub, - pythonAtLeast, - - # build-system - setuptools, - wheel, - - # propagates aiofiles, + aioquic, + beautifulsoup4, + buildPythonPackage, + doCheck ? !stdenv.isDarwin, # on Darwin, tests fail but pkg still works + fetchFromGitHub, + gunicorn, html5tagger, httptools, multidict, + pytest-asyncio, + pytestCheckHook, + pythonAtLeast, + pythonOlder, sanic-routing, + sanic-testing, + setuptools, tracerite, typing-extensions, ujson, + uvicorn, uvloop, websockets, - - # optionals - aioquic, - - # tests - doCheck ? !stdenv.isDarwin, # on Darwin, tests fail but pkg still works - - beautifulsoup4, - gunicorn, - pytest-asyncio, - pytestCheckHook, - pythonOlder, - sanic-testing, - uvicorn, }: buildPythonPackage rec { pname = "sanic"; version = "24.6.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "sanic-org"; - repo = pname; + repo = "sanic"; rev = "refs/tags/v${version}"; hash = "sha256-AviYqdr+r5ya4mFJKGUatBsaMMmCQGqE3YtDJwTuaY0="; }; - nativeBuildInputs = [ - setuptools - wheel - ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ aiofiles httptools html5tagger @@ -115,16 +102,19 @@ buildPythonPackage rec { # Server mode mismatch (debug vs production) "test_num_workers" # Racy tests + "test_custom_cert_loader" "test_keep_alive_client_timeout" "test_keep_alive_server_timeout" + "test_logger_vhosts" + "test_ssl_in_multiprocess_mode" "test_zero_downtime" # sanic.exceptions.SanicException: Cannot setup Sanic Simple Server without a path to a directory "test_load_app_simple" - # create defunct python processes + # Tests create defunct Python processes "test_reloader_live" "test_reloader_live_with_dir" "test_reload_listeners" - # crash the python interpreter + # Tests crash the Python interpreter "test_host_port_localhost" "test_host_port" "test_server_run" @@ -156,7 +146,7 @@ buildPythonPackage rec { "test_multiprocessing.py" ]; - # avoid usage of nixpkgs-review in darwin since tests will compete usage + # Avoid usage of nixpkgs-review in darwin since tests will compete usage # for the same local port __darwinAllowLocalNetworking = true; @@ -164,10 +154,10 @@ buildPythonPackage rec { meta = with lib; { description = "Web server and web framework"; - mainProgram = "sanic"; homepage = "https://github.com/sanic-org/sanic/"; changelog = "https://github.com/sanic-org/sanic/releases/tag/v${version}"; license = licenses.mit; maintainers = [ ]; + mainProgram = "sanic"; }; } From 3f05ee4a177b031d553c0d996136638a0d80b836 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Aug 2024 10:57:30 +0200 Subject: [PATCH 3/3] python312Packages.sanic-testing: 23.12.0 -> 24.6.0 Diff: https://github.com/sanic-org/sanic-testing/compare/refs/tags/v23.12.0...v24.6.0 Changelog: https://github.com/sanic-org/sanic-testing/releases/tag/v24.6.0 --- .../python-modules/sanic-testing/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/sanic-testing/default.nix b/pkgs/development/python-modules/sanic-testing/default.nix index 68b4ccc3d8f7..c326c76e0f5b 100644 --- a/pkgs/development/python-modules/sanic-testing/default.nix +++ b/pkgs/development/python-modules/sanic-testing/default.nix @@ -6,13 +6,14 @@ httpx, pythonOlder, sanic, + setuptools, websockets, }: buildPythonPackage rec { pname = "sanic-testing"; - version = "23.12.0"; - format = "setuptools"; + version = "24.6.0"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -20,7 +21,7 @@ buildPythonPackage rec { owner = "sanic-org"; repo = "sanic-testing"; rev = "refs/tags/v${version}"; - hash = "sha256-pFsGB0QDeO/iliHOitHqBIQtDlwRgFg8nhgMLsopoec="; + hash = "sha256-biUgxa0sINHAYzyKimVD8+/mPUq2dlnCl2BN+UeUaEo="; }; outputs = [ @@ -28,7 +29,9 @@ buildPythonPackage rec { "testsout" ]; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ httpx sanic websockets