From f61300e2b9d7a28bec40942b3f9f835481cf528c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 28 Aug 2024 09:37:58 -0700 Subject: [PATCH 1/3] python312Packages.curio-compat: init at 1.6.7 --- .../python-modules/curio-compat/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/curio-compat/default.nix diff --git a/pkgs/development/python-modules/curio-compat/default.nix b/pkgs/development/python-modules/curio-compat/default.nix new file mode 100644 index 000000000000..6ea4da8feb3f --- /dev/null +++ b/pkgs/development/python-modules/curio-compat/default.nix @@ -0,0 +1,38 @@ +{ + buildPythonPackage, + fetchFromGitHub, + lib, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "curio-compat"; + version = "1.6.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "klen"; + repo = "curio"; + rev = "refs/tags/${version}"; + hash = "sha256-Crd9r4Icwga85wvtXaePbE56R192o+FXU9Zn+Lc7trI="; + }; + + build-system = [ setuptools ]; + + pythonImportsCheck = [ "curio" ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + disabledTests = [ + # contacts google.com + "test_ssl_outgoing" + ]; + + meta = { + description = "Coroutine-based library for concurrent systems programming"; + homepage = "https://github.com/klen/curio"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9320c4ec1ff9..5ff18c9d75fc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2719,6 +2719,8 @@ self: super: with self; { curio = callPackage ../development/python-modules/curio { }; + curio-compat = callPackage ../development/python-modules/curio-compat { }; + curlify = callPackage ../development/python-modules/curlify { }; curl-cffi = callPackage ../development/python-modules/curl-cffi { }; From ec8e0d5178a99d95e0b443d8639c7e38b247ecaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 28 Aug 2024 09:41:12 -0700 Subject: [PATCH 2/3] python312Packages.pytest-aio: update dependencies --- .../python-modules/pytest-aio/default.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pytest-aio/default.nix b/pkgs/development/python-modules/pytest-aio/default.nix index 5706ffce5ce9..b76cd96230d2 100644 --- a/pkgs/development/python-modules/pytest-aio/default.nix +++ b/pkgs/development/python-modules/pytest-aio/default.nix @@ -2,16 +2,16 @@ lib, anyio, buildPythonPackage, - curio, + curio-compat, fetchFromGitHub, hypothesis, pytest, pytestCheckHook, pythonOlder, poetry-core, - sniffio, trio, trio-asyncio, + uvloop, }: buildPythonPackage rec { @@ -19,7 +19,7 @@ buildPythonPackage rec { version = "1.9.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "klen"; @@ -32,16 +32,18 @@ buildPythonPackage rec { buildInputs = [ pytest ]; - dependencies = [ - anyio - curio - hypothesis - sniffio - trio - trio-asyncio - ]; + optional-dependencies = { + curio = [ curio-compat ]; + trio = [ trio ]; + uvloop = [ uvloop ]; + }; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + anyio + hypothesis + pytestCheckHook + trio-asyncio + ] ++ lib.flatten (lib.attrValues optional-dependencies); pythonImportsCheck = [ "pytest_aio" ]; From 0336e9c6e1494109788f9b3f75b21f7b75151b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 28 Aug 2024 09:02:24 -0700 Subject: [PATCH 3/3] python312Packages.solarlog-cli: 0.1.6 -> 0.2.0 Diff: https://github.com/dontinelli/solarlog_cli/compare/refs/tags/v0.1.6...v0.2.0 Changelog: https://github.com/dontinelli/solarlog_cli/releases/tag/v0.2.0 --- .../python-modules/solarlog-cli/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/solarlog-cli/default.nix b/pkgs/development/python-modules/solarlog-cli/default.nix index 346d68fc914c..25a4fc4deecb 100644 --- a/pkgs/development/python-modules/solarlog-cli/default.nix +++ b/pkgs/development/python-modules/solarlog-cli/default.nix @@ -5,11 +5,16 @@ fetchFromGitHub, hatchling, aiohttp, + mashumaro, + aioresponses, + pytest-aio, + pytestCheckHook, + syrupy, }: buildPythonPackage rec { pname = "solarlog-cli"; - version = "0.1.6"; + version = "0.2.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -18,17 +23,24 @@ buildPythonPackage rec { owner = "dontinelli"; repo = "solarlog_cli"; rev = "refs/tags/v${version}"; - hash = "sha256-Bliq1n6xH0cZQHueiGDyalIo0zms8zCSpUGq2KH5xZY="; + hash = "sha256-x9MovIKFImu60Ns2sJTy71S22cR9Az/yNMWzGM50y7Y="; }; build-system = [ hatchling ]; - dependencies = [ aiohttp ]; + dependencies = [ + aiohttp + mashumaro + ]; pythonImportsCheck = [ "solarlog_cli" ]; - # upstream has no tests - doCheck = false; + nativeCheckInputs = [ + aioresponses + pytest-aio + pytestCheckHook + syrupy + ]; meta = { changelog = "https://github.com/dontinelli/solarlog_cli/releases/tag/v${version}";