From bb76791b650eeed0c6d20fcfec38ee97cc4e30b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 11 Mar 2023 09:23:10 -0800 Subject: [PATCH 1/3] python310Packages.fastapi: don't run databases tests Databases is incompatible with SQLAlchemy 2.0. --- pkgs/development/python-modules/fastapi/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index 05bb745ca1d9..fec7d7b6a6dd 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -39,6 +39,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ + --replace '"databases[sqlite] >=0.3.2,<0.7.0",' "" \ --replace "starlette==" "starlette>=" ''; @@ -49,7 +50,7 @@ buildPythonPackage rec { nativeCheckInputs = [ aiosqlite - databases + # databases FIXME incompatible with SQLAlchemy 2.0 flask httpx orjson @@ -73,6 +74,9 @@ buildPythonPackage rec { "tests/test_default_response_class.py" # Don't test docs and examples "docs_src" + # databases is incompatible with SQLAlchemy 2.0 + "tests/test_tutorial/test_async_sql_databases" + "tests/test_tutorial/test_sql_databases" ]; disabledTests = [ From e8b6c2ff8f5685d9fc3f7cf09f2614112bc6c69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 11 Mar 2023 10:13:21 -0800 Subject: [PATCH 2/3] ntfy: pin SQLAlchemy at 1.4.46 --- pkgs/tools/misc/ntfy/default.nix | 18 ++++++++++++++++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/ntfy/default.nix b/pkgs/tools/misc/ntfy/default.nix index 3e10f1817386..fcf45ae493e6 100644 --- a/pkgs/tools/misc/ntfy/default.nix +++ b/pkgs/tools/misc/ntfy/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, python +, python39 , fetchFromGitHub , fetchpatch , withXmpp ? !stdenv.isDarwin @@ -12,7 +12,21 @@ }: let - ntfy-webpush = python.pkgs.callPackage ./webpush.nix { }; + python = python39.override { + packageOverrides = self: super: { + ntfy-webpush = self.callPackage ./webpush.nix { }; + + # databases, on which slack-sdk depends, is incompatible with SQLAlchemy 2.0 + sqlalchemy = super.sqlalchemy.overridePythonAttrs (old: rec { + version = "1.4.46"; + src = self.fetchPypi { + pname = "SQLAlchemy"; + inherit version; + hash = "sha256-aRO4JH2KKS74MVFipRkx4rQM6RaB8bbxj2lwRSAMSjA="; + }; + }); + }; + }; in python.pkgs.buildPythonApplication rec { pname = "ntfy"; version = "2.7.0"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4190117b38a8..3080a48a1ee2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10395,7 +10395,7 @@ with pkgs; # ntfsprogs are merged into ntfs-3g ntfsprogs = pkgs.ntfs3g; - ntfy = callPackage ../tools/misc/ntfy { python = python39; }; + ntfy = callPackage ../tools/misc/ntfy { }; ntfy-sh = callPackage ../tools/misc/ntfy-sh { }; From 2335816420081733fcb7d6fb64e2081d754a8af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 11 Mar 2023 17:06:46 -0800 Subject: [PATCH 3/3] python310Packages.parsedmarc: 8.2.0 -> 8.4.2 Changelog: https://github.com/domainaware/parsedmarc/blob/master/CHANGELOG.md#842 --- .../python-modules/parsedmarc/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/parsedmarc/default.nix b/pkgs/development/python-modules/parsedmarc/default.nix index c07a773eee17..5002f564094c 100644 --- a/pkgs/development/python-modules/parsedmarc/default.nix +++ b/pkgs/development/python-modules/parsedmarc/default.nix @@ -7,6 +7,7 @@ , pythonOlder # pythonPackages +, hatchling , dnspython , expiringdict , publicsuffix2 @@ -40,20 +41,26 @@ let in buildPythonPackage rec { pname = "parsedmarc"; - version = "8.2.0"; + version = "8.4.2"; disabled = pythonOlder "3.7"; + format = "pyproject"; + src = fetchPypi { inherit pname version; - sha256 = "eb82328dffb4a62ddaefbcc22efd5a2694350504a56d41ba1e161f2d998dcbff"; + hash = "sha256-6dP9zQI0jYiE+lUhmFBNp8Sv9povm9Pa4R4TuzAmEQk="; }; postPatch = '' - substituteInPlace setup.py \ + substituteInPlace pyproject.toml \ --replace "elasticsearch<7.14.0" "elasticsearch" ''; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ dnspython expiringdict @@ -91,6 +98,7 @@ buildPythonPackage rec { }; meta = { + changelog = "https://github.com/domainaware/parsedmarc/blob/master/CHANGELOG.md#${lib.replaceStrings [ "." ] [ "" ] version}"; description = "Python module and CLI utility for parsing DMARC reports"; homepage = "https://domainaware.github.io/parsedmarc/"; maintainers = with lib.maintainers; [ talyz ];