From 6cde10ba6bf8fcd9fc8a0e1e929bce73a6f9aec4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:11:40 +0200 Subject: [PATCH 01/11] python312Packages.pytest-bdd: 6.1.1 -> 7.1.2 Diff: https://github.com/pytest-dev/pytest-bdd/compare/refs/tags/6.1.1...7.1.2 Changelog: https://github.com/pytest-dev/pytest-bdd/blob/7.1.2/CHANGES.rst --- .../python-modules/pytest-bdd/default.nix | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/pytest-bdd/default.nix b/pkgs/development/python-modules/pytest-bdd/default.nix index 3660dc709f31..c5675f38cef2 100644 --- a/pkgs/development/python-modules/pytest-bdd/default.nix +++ b/pkgs/development/python-modules/pytest-bdd/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , fetchFromGitHub -, fetchpatch , mako , parse , parse-type @@ -14,27 +13,19 @@ buildPythonPackage rec { pname = "pytest-bdd"; - version = "6.1.1"; - format = "pyproject"; + version = "7.1.2"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "pytest-dev"; - repo = pname; + repo = "pytest-bdd"; rev = "refs/tags/${version}"; - hash = "sha256-+76jIgfDQPdIoesTr1+QUu8wmOnrdf4KT+TJr9F2Hqk="; + hash = "sha256-PC4VSsUU5qEFp/C/7OTgHINo8wmOo0w2d1Hpe0EnFzE="; }; - patches = [ - (fetchpatch { - name = "remove-setuptools.patch"; - url = "https://github.com/pytest-dev/pytest-bdd/commit/5d8eda3a30b47d3bd27849884a851adafca765cb.patch"; - hash = "sha256-G2WHaRKlQ9HINufh8wl7+ly7HfDGobMLzzlbwDwd+o8="; - }) - ]; - - nativeBuildInputs = [ + build-system = [ poetry-core ]; @@ -42,7 +33,7 @@ buildPythonPackage rec { pytest ]; - propagatedBuildInputs = [ + dependencies = [ mako parse parse-type @@ -63,9 +54,10 @@ buildPythonPackage rec { meta = with lib; { description = "BDD library for the pytest"; - mainProgram = "pytest-bdd"; homepage = "https://github.com/pytest-dev/pytest-bdd"; + changelog = "https://github.com/pytest-dev/pytest-bdd/blob/${version}/CHANGES.rst"; license = licenses.mit; maintainers = with maintainers; [ jm2dev ]; + mainProgram = "pytest-bdd"; }; } From 7db70a7b687d12a160a22912b5c8cade8256d63b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:12:16 +0200 Subject: [PATCH 02/11] python312Packages.pytest-bdd: format with nixfmt --- .../python-modules/pytest-bdd/default.nix | 39 ++++++++----------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/pytest-bdd/default.nix b/pkgs/development/python-modules/pytest-bdd/default.nix index c5675f38cef2..025938b94264 100644 --- a/pkgs/development/python-modules/pytest-bdd/default.nix +++ b/pkgs/development/python-modules/pytest-bdd/default.nix @@ -1,14 +1,15 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, mako -, parse -, parse-type -, poetry-core -, pytest -, pytestCheckHook -, pythonOlder -, typing-extensions +{ + lib, + buildPythonPackage, + fetchFromGitHub, + mako, + parse, + parse-type, + poetry-core, + pytest, + pytestCheckHook, + pythonOlder, + typing-extensions, }: buildPythonPackage rec { @@ -25,13 +26,9 @@ buildPythonPackage rec { hash = "sha256-PC4VSsUU5qEFp/C/7OTgHINo8wmOo0w2d1Hpe0EnFzE="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; - buildInputs = [ - pytest - ]; + buildInputs = [ pytest ]; dependencies = [ mako @@ -40,17 +37,13 @@ buildPythonPackage rec { typing-extensions ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; preCheck = '' export PATH=$PATH:$out/bin ''; - pythonImportsCheck = [ - "pytest_bdd" - ]; + pythonImportsCheck = [ "pytest_bdd" ]; meta = with lib; { description = "BDD library for the pytest"; From e57658dced028946a8275fcd0f00034faeebcc5d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:16:04 +0200 Subject: [PATCH 03/11] python312Packages.elastic-apm: 6.21.3 -> 6.22.0 Diff: https://github.com/elastic/apm-agent-python/compare/refs/tags/v6.21.3...v6.22.0 Changelog: https://github.com/elastic/apm-agent-python/releases/tag/v6.22.0 --- .../python-modules/elastic-apm/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/elastic-apm/default.nix b/pkgs/development/python-modules/elastic-apm/default.nix index 61ad6705fe9b..ff2e363a6938 100644 --- a/pkgs/development/python-modules/elastic-apm/default.nix +++ b/pkgs/development/python-modules/elastic-apm/default.nix @@ -18,6 +18,7 @@ , pytest-random-order , pytestCheckHook , pythonOlder +, pythonRelaxDepsHook , sanic , sanic-testing , setuptools @@ -31,7 +32,7 @@ buildPythonPackage rec { pname = "elastic-apm"; - version = "6.21.3"; + version = "6.22.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -40,14 +41,22 @@ buildPythonPackage rec { owner = "elastic"; repo = "apm-agent-python"; rev = "refs/tags/v${version}"; - hash = "sha256-Ejix31cMyHOc/IGe4bRp/Nchm9Ps1cRYE8jIaIYlJjs="; + hash = "sha256-VuVx+QUiV4M/ebyv2uF/YZwfvcaPDJAEi55fXfoIttU="; }; - nativeBuildInputs = [ + pythonRelaxDeps = [ + "wrapt" + ]; + + build-system = [ setuptools ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + dependencies = [ aiohttp blinker certifi From b99c9b718844fec4d6fe47648c87deb1845e23ea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:17:10 +0200 Subject: [PATCH 04/11] python312Packages.elastic-apm: format with nixfmt --- .../python-modules/elastic-apm/default.nix | 97 +++++++++---------- 1 file changed, 45 insertions(+), 52 deletions(-) diff --git a/pkgs/development/python-modules/elastic-apm/default.nix b/pkgs/development/python-modules/elastic-apm/default.nix index ff2e363a6938..25ef39efea06 100644 --- a/pkgs/development/python-modules/elastic-apm/default.nix +++ b/pkgs/development/python-modules/elastic-apm/default.nix @@ -1,33 +1,34 @@ -{ lib -, stdenv -, aiohttp -, blinker -, buildPythonPackage -, certifi -, ecs-logging -, fetchFromGitHub -, httpx -, jinja2 -, jsonschema -, logbook -, mock -, pytest-asyncio -, pytest-bdd -, pytest-localserver -, pytest-mock -, pytest-random-order -, pytestCheckHook -, pythonOlder -, pythonRelaxDepsHook -, sanic -, sanic-testing -, setuptools -, starlette -, structlog -, tornado -, urllib3 -, webob -, wrapt +{ + lib, + stdenv, + aiohttp, + blinker, + buildPythonPackage, + certifi, + ecs-logging, + fetchFromGitHub, + httpx, + jinja2, + jsonschema, + logbook, + mock, + pytest-asyncio, + pytest-bdd, + pytest-localserver, + pytest-mock, + pytest-random-order, + pytestCheckHook, + pythonOlder, + pythonRelaxDepsHook, + sanic, + sanic-testing, + setuptools, + starlette, + structlog, + tornado, + urllib3, + webob, + wrapt, }: buildPythonPackage rec { @@ -44,17 +45,11 @@ buildPythonPackage rec { hash = "sha256-VuVx+QUiV4M/ebyv2uF/YZwfvcaPDJAEi55fXfoIttU="; }; - pythonRelaxDeps = [ - "wrapt" - ]; + pythonRelaxDeps = [ "wrapt" ]; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; dependencies = [ aiohttp @@ -85,21 +80,19 @@ buildPythonPackage rec { webob ]; - disabledTests = [ - "elasticapm_client" - ]; + disabledTests = [ "elasticapm_client" ]; - disabledTestPaths = [ - # Exclude tornado tests - "tests/contrib/asyncio/tornado/tornado_tests.py" - ] ++ lib.optionals stdenv.isDarwin [ - # Flaky tests on Darwin - "tests/utils/threading_tests.py" - ]; + disabledTestPaths = + [ + # Exclude tornado tests + "tests/contrib/asyncio/tornado/tornado_tests.py" + ] + ++ lib.optionals stdenv.isDarwin [ + # Flaky tests on Darwin + "tests/utils/threading_tests.py" + ]; - pythonImportsCheck = [ - "elasticapm" - ]; + pythonImportsCheck = [ "elasticapm" ]; meta = with lib; { description = "Python agent for the Elastic APM"; From f65eeb51bee9eba6c019d3649deeacb2613061a7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:20:39 +0200 Subject: [PATCH 05/11] python312Packages.es-client: 8.12.8 -> 8.13.1 Diff: https://github.com/untergeek/es_client/compare/refs/tags/v8.12.8...v8.13.1 Changelog: https://github.com/untergeek/es_client/releases/tag/v8.13.1 --- pkgs/development/python-modules/es-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/es-client/default.nix b/pkgs/development/python-modules/es-client/default.nix index 0a1b0bad5ad6..1e8aa4b68ab1 100644 --- a/pkgs/development/python-modules/es-client/default.nix +++ b/pkgs/development/python-modules/es-client/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "es-client"; - version = "8.12.8"; + version = "8.13.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "untergeek"; repo = "es_client"; rev = "refs/tags/v${version}"; - hash = "sha256-qv06zb3hIK/TeOZwtMXrV+n8mYSA/UKiyHvRyKEvZkQ="; + hash = "sha256-4v9SRWVG9p4kCob4C3by2JxNqX6L3yMHpbnMYEAM7A0="; }; pythonRelaxDeps = true; From 4f51994509b626f68914c63d6b401267894ef245 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:23:29 +0200 Subject: [PATCH 06/11] python312Packages.es-client: refactor - format with nixfmt --- .../python-modules/es-client/default.nix | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/pkgs/development/python-modules/es-client/default.nix b/pkgs/development/python-modules/es-client/default.nix index 1e8aa4b68ab1..3204da1d5a97 100644 --- a/pkgs/development/python-modules/es-client/default.nix +++ b/pkgs/development/python-modules/es-client/default.nix @@ -1,21 +1,22 @@ -{ lib -, buildPythonPackage -, certifi -, click -, ecs-logging -, elastic-transport -, elasticsearch8 -, fetchFromGitHub -, hatchling -, mock -, pytest-asyncio -, pytestCheckHook -, pythonOlder -, pythonRelaxDepsHook -, pyyaml -, requests -, six -, voluptuous +{ + lib, + buildPythonPackage, + certifi, + click, + ecs-logging, + elastic-transport, + elasticsearch8, + fetchFromGitHub, + hatchling, + mock, + pytest-asyncio, + pytestCheckHook, + pythonOlder, + pythonRelaxDepsHook, + pyyaml, + requests, + six, + voluptuous, }: buildPythonPackage rec { @@ -34,12 +35,11 @@ buildPythonPackage rec { pythonRelaxDeps = true; - nativeBuildInputs = [ - hatchling - pythonRelaxDepsHook - ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ pythonRelaxDepsHook ]; + + dependencies = [ certifi click ecs-logging @@ -57,9 +57,7 @@ buildPythonPackage rec { requests ]; - pythonImportsCheck = [ - "es_client" - ]; + pythonImportsCheck = [ "es_client" ]; disabledTests = [ # Tests require network access From 1d5c336aa68fae0ba63ec006ffc62ba29a0f2a4c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:24:38 +0200 Subject: [PATCH 07/11] elasticsearch-curator: 8.0.12 -> 8.0.15 Diff: https://github.com/elastic/curator/compare/refs/tags/v8.0.12...v8.0.15 Changelog: https://github.com/elastic/curator/releases/tag/v8.0.15 --- pkgs/by-name/el/elasticsearch-curator/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/el/elasticsearch-curator/package.nix b/pkgs/by-name/el/elasticsearch-curator/package.nix index 3e12c03cbece..b4a56d891125 100644 --- a/pkgs/by-name/el/elasticsearch-curator/package.nix +++ b/pkgs/by-name/el/elasticsearch-curator/package.nix @@ -8,14 +8,14 @@ python3.pkgs.buildPythonApplication rec { pname = "elasticsearch-curator"; - version = "8.0.12"; + version = "8.0.15"; format = "pyproject"; src = fetchFromGitHub { owner = "elastic"; repo = "curator"; rev = "refs/tags/v${version}"; - hash = "sha256-CU/8l5607eKodcdpMKu0Wdlg+K6YnFX6uoDju12NDR0="; + hash = "sha256-pW928jT9oL76RJuJgH7nhCvgWPzXixzqBKVYsaJy9xw="; }; build-system = with python3.pkgs; [ From dcd42c58966511214a43ccc9d0d64d91f6cfef13 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:24:53 +0200 Subject: [PATCH 08/11] elasticsearch-curator: format with nixfmt --- .../el/elasticsearch-curator/package.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/el/elasticsearch-curator/package.nix b/pkgs/by-name/el/elasticsearch-curator/package.nix index b4a56d891125..6a142aeb1ac5 100644 --- a/pkgs/by-name/el/elasticsearch-curator/package.nix +++ b/pkgs/by-name/el/elasticsearch-curator/package.nix @@ -1,9 +1,10 @@ -{ lib -, elasticsearch-curator -, fetchFromGitHub -, nix-update-script -, python3 -, testers +{ + lib, + elasticsearch-curator, + fetchFromGitHub, + nix-update-script, + python3, + testers, }: python3.pkgs.buildPythonApplication rec { @@ -18,9 +19,7 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-pW928jT9oL76RJuJgH7nhCvgWPzXixzqBKVYsaJy9xw="; }; - build-system = with python3.pkgs; [ - hatchling - ]; + build-system = with python3.pkgs; [ hatchling ]; dependencies = with python3.pkgs; [ certifi From 533c6e184c8266c8c452e5be71c0c54deec2f228 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:31:11 +0200 Subject: [PATCH 09/11] jrnl: refactor --- pkgs/applications/misc/jrnl/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/jrnl/default.nix b/pkgs/applications/misc/jrnl/default.nix index 43d320a4c043..5f356bb6f129 100644 --- a/pkgs/applications/misc/jrnl/default.nix +++ b/pkgs/applications/misc/jrnl/default.nix @@ -8,20 +8,20 @@ python3.pkgs.buildPythonApplication rec { pname = "jrnl"; version = "4.1"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "jrnl-org"; - repo = pname; + repo = "jrnl"; rev = "refs/tags/v${version}"; hash = "sha256-DtujXSDJWnOrHjVgJEJNKJMhSrNBHlR2hvHeHLSIF2o="; }; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ poetry-core ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ asteval colorama cryptography @@ -58,9 +58,9 @@ python3.pkgs.buildPythonApplication rec { }; meta = with lib; { - changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}"; - description = "Simple command line journal application that stores your journal in a plain text file"; + description = "Command line journal application that stores your journal in a plain text file"; homepage = "https://jrnl.sh/"; + changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}"; license = licenses.gpl3Only; maintainers = with maintainers; [ bryanasdev000 zalakain ]; mainProgram = "jrnl"; From fc41b1abe251ec00151bb6301b5390e8e6b62f77 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:33:35 +0200 Subject: [PATCH 10/11] jrnl: patch for to support pytest_bdd 7.1.2 and later --- pkgs/applications/misc/jrnl/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/misc/jrnl/default.nix b/pkgs/applications/misc/jrnl/default.nix index 5f356bb6f129..e1ec1d80782f 100644 --- a/pkgs/applications/misc/jrnl/default.nix +++ b/pkgs/applications/misc/jrnl/default.nix @@ -17,6 +17,12 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-DtujXSDJWnOrHjVgJEJNKJMhSrNBHlR2hvHeHLSIF2o="; }; + postPatch = '' + # Support pytest_bdd 7.1.2 and later, https://github.com/jrnl-org/jrnl/pull/1878 + substituteInPlace tests/lib/when_steps.py \ + --replace-fail "from pytest_bdd.steps import inject_fixture" "from pytest_bdd.compat import inject_fixture" + ''; + build-system = with python3.pkgs; [ poetry-core ]; From c7bfada2c41a2da119d5184d0dab584e0ceac395 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Apr 2024 15:34:12 +0200 Subject: [PATCH 11/11] jrnl: format with nixfmt --- pkgs/applications/misc/jrnl/default.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/misc/jrnl/default.nix b/pkgs/applications/misc/jrnl/default.nix index e1ec1d80782f..1e8113765f12 100644 --- a/pkgs/applications/misc/jrnl/default.nix +++ b/pkgs/applications/misc/jrnl/default.nix @@ -1,8 +1,9 @@ -{ lib -, fetchFromGitHub -, python3 -, testers -, jrnl +{ + lib, + fetchFromGitHub, + python3, + testers, + jrnl, }: python3.pkgs.buildPythonApplication rec { @@ -23,9 +24,7 @@ python3.pkgs.buildPythonApplication rec { --replace-fail "from pytest_bdd.steps import inject_fixture" "from pytest_bdd.compat import inject_fixture" ''; - build-system = with python3.pkgs; [ - poetry-core - ]; + build-system = with python3.pkgs; [ poetry-core ]; dependencies = with python3.pkgs; [ asteval @@ -49,14 +48,11 @@ python3.pkgs.buildPythonApplication rec { toml ]; - preCheck = '' export HOME=$(mktemp -d); ''; - pythonImportsCheck = [ - "jrnl" - ]; + pythonImportsCheck = [ "jrnl" ]; passthru.tests.version = testers.testVersion { package = jrnl; @@ -68,7 +64,10 @@ python3.pkgs.buildPythonApplication rec { homepage = "https://jrnl.sh/"; changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}"; license = licenses.gpl3Only; - maintainers = with maintainers; [ bryanasdev000 zalakain ]; + maintainers = with maintainers; [ + bryanasdev000 + zalakain + ]; mainProgram = "jrnl"; }; }