From 1df20c1d4f02d433274ca4c5ed6c74c184728a8a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 6 Jul 2024 15:26:55 +0200 Subject: [PATCH 1/3] python312Packages.graphene: disable tests The test dependencies are not yet Python 3.12 compatible. --- pkgs/development/python-modules/graphene/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/graphene/default.nix b/pkgs/development/python-modules/graphene/default.nix index 14fcdeb744e7..bea97bea98f7 100644 --- a/pkgs/development/python-modules/graphene/default.nix +++ b/pkgs/development/python-modules/graphene/default.nix @@ -37,6 +37,9 @@ buildPythonPackage rec { graphql-relay ]; + # snaphottest->fastdiff->wasmer dependency chain does not support 3.12. + doCheck = pythonOlder "3.12"; + nativeCheckInputs = [ pytest7CheckHook pytest-asyncio From 4c849ba5a9417eff1a5ad9a89140155ca39947f0 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 6 Jul 2024 15:32:17 +0200 Subject: [PATCH 2/3] pretalx: return to python 3.12 --- pkgs/by-name/pr/pretalx/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/pretalx/package.nix b/pkgs/by-name/pr/pretalx/package.nix index bbfd52c1ad24..6313a6748b8d 100644 --- a/pkgs/by-name/pr/pretalx/package.nix +++ b/pkgs/by-name/pr/pretalx/package.nix @@ -1,7 +1,7 @@ { lib , buildNpmPackage , gettext -, python311 +, python3 , fetchFromGitHub , fetchpatch2 , plugins ? [ ] @@ -9,7 +9,7 @@ }: let - python = python311.override { + python = python3.override { packageOverrides = final: prev: { django-bootstrap4 = prev.django-bootstrap4.overridePythonAttrs (oldAttrs: rec { version = "3.0.0"; From 29a10b30fb805fed2586b0c11a530ea4c21549a3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 6 Jul 2024 15:58:52 +0200 Subject: [PATCH 3/3] python312Packages.django-graphiql-debug-toolbar: fix tests --- .../django-graphiql-debug-toolbar/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/django-graphiql-debug-toolbar/default.nix b/pkgs/development/python-modules/django-graphiql-debug-toolbar/default.nix index 60a3ed0de63e..63140be2e28b 100644 --- a/pkgs/development/python-modules/django-graphiql-debug-toolbar/default.nix +++ b/pkgs/development/python-modules/django-graphiql-debug-toolbar/default.nix @@ -3,11 +3,19 @@ buildPythonPackage, pythonOlder, fetchFromGitHub, + + # build-system poetry-core, + + # dependencies django, django-debug-toolbar, graphene-django, + + # tests python, + pytest-django, + pytestCheckHook }: buildPythonPackage rec { @@ -33,17 +41,19 @@ buildPythonPackage rec { pythonImportsCheck = [ "graphiql_debug_toolbar" ]; - DB_BACKEND = "sqlite"; - DB_NAME = ":memory:"; - DJANGO_SETTINGS_MODULE = "tests.settings"; + nativeCheckInputs = [ + pytest-django + pytestCheckHook + ]; - checkPhase = '' - runHook preCheck - ${python.interpreter} -m django test tests - runHook postCheck + preCheck = '' + export DB_BACKEND=sqlite + export DB_NAME=:memory: + export DJANGO_SETTINGS_MODULE=tests.settings ''; meta = with lib; { + changelog = "https://github.com/flavors/django-graphiql-debug-toolbar/releases/tag/${src.rev}"; description = "Django Debug Toolbar for GraphiQL IDE"; homepage = "https://github.com/flavors/django-graphiql-debug-toolbar"; license = licenses.mit;