From 7d6edd1442c6226f1128ee5529600b580b8b22ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 4 Jan 2025 22:53:15 +0100 Subject: [PATCH 1/6] python312Packages.mkdocstrings-python: 1.12.2 -> 1.13.0 Changelog: https://github.com/mkdocstrings/python/blob/1.13.0/CHANGELOG.md --- .../python-modules/mkdocstrings-python/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mkdocstrings-python/default.nix b/pkgs/development/python-modules/mkdocstrings-python/default.nix index 445867512658..dbf84e3b9f4e 100644 --- a/pkgs/development/python-modules/mkdocstrings-python/default.nix +++ b/pkgs/development/python-modules/mkdocstrings-python/default.nix @@ -1,8 +1,11 @@ { lib, + beautifulsoup4, buildPythonPackage, fetchFromGitHub, griffe, + inline-snapshot, + mkdocs-autorefs, mkdocs-material, mkdocstrings, pdm-backend, @@ -12,7 +15,7 @@ buildPythonPackage rec { pname = "mkdocstrings-python"; - version = "1.12.2"; + version = "1.13.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -21,17 +24,20 @@ buildPythonPackage rec { owner = "mkdocstrings"; repo = "python"; tag = version; - hash = "sha256-dc9RXbrwZS/7eAF0BrGS2kJxG62rB5RLxf3yNZ6+g4Q="; + hash = "sha256-NgVCKV3AWk4pRT7/+6YGXmKSZETL4ZOWDWGeb/qjdng="; }; build-system = [ pdm-backend ]; dependencies = [ griffe + mkdocs-autorefs mkdocstrings ]; nativeCheckInputs = [ + beautifulsoup4 + inline-snapshot mkdocs-material pytestCheckHook ]; @@ -41,6 +47,8 @@ buildPythonPackage rec { disabledTests = [ # Tests fails with AssertionError "test_windows_root_conversion" + # TypeError + "test_format_code" ]; meta = with lib; { From 5ea9b7404efde2f18925b5e3914c8050041552c6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jan 2025 11:03:27 +0100 Subject: [PATCH 2/6] python313Packages.drf-extra-fields: disable failing test on Python 3.13 --- .../python-modules/drf-extra-fields/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/drf-extra-fields/default.nix b/pkgs/development/python-modules/drf-extra-fields/default.nix index 76966803cf29..a96ef316fbaa 100644 --- a/pkgs/development/python-modules/drf-extra-fields/default.nix +++ b/pkgs/development/python-modules/drf-extra-fields/default.nix @@ -1,15 +1,16 @@ { lib, buildPythonPackage, - fetchFromGitHub, - setuptools, django, djangorestframework, + fetchFromGitHub, filetype, pillow, psycopg2, - pytestCheckHook, pytest-django, + pytestCheckHook, + pythonAtLeast, + setuptools, }: buildPythonPackage rec { @@ -20,7 +21,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "hipo"; repo = "drf-extra-fields"; - rev = "v${version}"; + tag = "v${version}"; hash = "sha256-Ym4vnZ/t0ZdSxU53BC0ducJl1YiTygRSWql/35PNbOU"; }; @@ -45,6 +46,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "drf_extra_fields" ]; + disabledTests = lib.optionals (pythonAtLeast "3.13") [ + # https://github.com/Hipo/drf-extra-fields/issues/210 + "test_read_source_with_context" + ]; + meta = { description = "Extra Fields for Django Rest Framework"; homepage = "https://github.com/Hipo/drf-extra-fields"; From ccd0f01838c94c2961bba6f76108c9b02d1c1e0f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jan 2025 11:05:43 +0100 Subject: [PATCH 3/6] python313Packages.netbox-plugin-prometheus-sd: refactor --- .../netbox-plugin-prometheus-sd/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix index 24eb14c00748..65475c92807d 100644 --- a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix +++ b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix @@ -2,8 +2,8 @@ lib, buildPythonPackage, fetchFromGitHub, - poetry-core, netbox, + poetry-core, }: buildPythonPackage rec { @@ -14,17 +14,13 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "FlxPeters"; repo = "netbox-plugin-prometheus-sd"; - rev = "v${version}"; + tag = "v${version}"; hash = "sha256-UtvSkqs2PN3uxCB78hJjh0lZ1WbZGjDpwlKyeAGpiEM="; }; - nativeBuildInputs = [ - poetry-core - ]; + build-system = [ poetry-core ]; - nativeCheckInputs = [ - netbox - ]; + nativeCheckInputs = [ netbox ]; preFixup = '' export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH From 8c52579ad9f9a7575a16642cf08340125837f915 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jan 2025 11:07:11 +0100 Subject: [PATCH 4/6] python313Packages.netbox-plugin-prometheus-sd: update homepage - add changelog to meta --- .../python-modules/netbox-plugin-prometheus-sd/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix index 65475c92807d..3d7a338be24c 100644 --- a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix +++ b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, netbox, poetry-core, + pythonOlder, }: buildPythonPackage rec { @@ -11,6 +12,8 @@ buildPythonPackage rec { version = "1.1.1"; pyproject = true; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "FlxPeters"; repo = "netbox-plugin-prometheus-sd"; @@ -30,7 +33,8 @@ buildPythonPackage rec { meta = with lib; { description = "Netbox plugin to provide Netbox entires to Prometheus HTTP service discovery"; - homepage = "https://pypi.org/project/netbox-plugin-prometheus-sd/"; + homepage = "https://github.com/FlxPeters/netbox-plugin-prometheus-sd"; + changelog = "https://github.com/FlxPeters/netbox-plugin-prometheus-sd/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ xanderio ]; }; From 2330b7c55698671603cf328bdc8420b69e285626 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jan 2025 11:10:38 +0100 Subject: [PATCH 5/6] python313Packages.netbox-plugin-prometheus-sd: set version --- .../python-modules/netbox-plugin-prometheus-sd/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix index 3d7a338be24c..75f5fb754ef4 100644 --- a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix +++ b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix @@ -21,6 +21,11 @@ buildPythonPackage rec { hash = "sha256-UtvSkqs2PN3uxCB78hJjh0lZ1WbZGjDpwlKyeAGpiEM="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${version}"' + ''; + build-system = [ poetry-core ]; nativeCheckInputs = [ netbox ]; From f6d84474d0a3e45e56f3a600304fd3387af6556b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 7 Jan 2025 11:52:49 +0100 Subject: [PATCH 6/6] python313Packages.netbox-plugin-prometheus-sd: add missing inputs --- .../netbox-plugin-prometheus-sd/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix index 75f5fb754ef4..df7f71e0ff2e 100644 --- a/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix +++ b/pkgs/development/python-modules/netbox-plugin-prometheus-sd/default.nix @@ -1,7 +1,9 @@ { lib, buildPythonPackage, + django, fetchFromGitHub, + netaddr, netbox, poetry-core, pythonOlder, @@ -24,10 +26,17 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ --replace-fail 'version = "0.0.0"' 'version = "${version}"' + substituteInPlace netbox_prometheus_sd/__init__.py \ + --replace-fail "from extras.plugins import PluginConfig" "from netbox.plugins import PluginConfig" ''; - + build-system = [ poetry-core ]; + dependencies = [ + django + netaddr + ]; + nativeCheckInputs = [ netbox ]; preFixup = ''