From 3d176d96a2b2746c4455f16a969797b4462e20c2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 21 Jan 2023 13:00:28 +0100 Subject: [PATCH] python310Packages.ormar: switch to pythonRelaxDepsHook --- .../python-modules/ormar/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/ormar/default.nix b/pkgs/development/python-modules/ormar/default.nix index 57b43c3b562e..e9b8dc358ede 100644 --- a/pkgs/development/python-modules/ormar/default.nix +++ b/pkgs/development/python-modules/ormar/default.nix @@ -8,6 +8,7 @@ , databases , fastapi , fetchFromGitHub +, httpx , importlib-metadata , mysqlclient , orjson @@ -18,6 +19,7 @@ , pytest-asyncio , pytestCheckHook , pythonOlder +, pythonRelaxDepsHook , sqlalchemy , typing-extensions }: @@ -36,8 +38,15 @@ buildPythonPackage rec { hash = "sha256-B6dC9+t/pe7vsPb7rkGAbJWLfCAF7lIElFvt1pUu5yA="; }; + pythonRelaxDeps = [ + "databases" + "pydantic" + "SQLAlchemy" + ]; + nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -61,6 +70,7 @@ buildPythonPackage rec { aiosqlite asyncpg fastapi + httpx mysqlclient psycopg2 pymysql @@ -68,15 +78,10 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'SQLAlchemy = ">=1.3.18,<1.4.42"' 'SQLAlchemy = ">=1.3.18"' \ - --replace 'databases = ">=0.3.2,!=0.5.0,!=0.5.1,!=0.5.2,!=0.5.3,<0.6.2"' 'databases = ">=0.5.5"' - ''; - disabledTests = [ # TypeError: Object of type bytes is not JSON serializable "test_bulk_operations_with_json" + "test_all_endpoints" # Tests require a database "test_model_multiple_instances_of_same_table_in_schema" "test_load_all_multiple_instances_of_same_table_in_schema"