From 545c162a7d18e0cf8ea05e77c15b2d561a23aa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 10 Aug 2024 03:18:41 -0700 Subject: [PATCH] python312Packages.safety: 3.2.4 -> 3.2.5 Changelog: https://github.com/pyupio/safety/blob/3.2.5/CHANGELOG.md --- .../python-modules/safety/default.nix | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/safety/default.nix b/pkgs/development/python-modules/safety/default.nix index 9e85497ac44f..2db623d74f02 100644 --- a/pkgs/development/python-modules/safety/default.nix +++ b/pkgs/development/python-modules/safety/default.nix @@ -2,7 +2,7 @@ lib, buildPythonPackage, pythonOlder, - fetchPypi, + fetchFromGitHub, setuptools, click, urllib3, @@ -13,34 +13,37 @@ jinja2, marshmallow, authlib, - jwt, rich, typer, pydantic, safety-schemas, typing-extensions, filelock, + psutil, + git, pytestCheckHook, }: buildPythonPackage rec { pname = "safety"; - version = "3.2.4"; + version = "3.2.5"; disabled = pythonOlder "3.7"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-usAgIBbXNqIRgFeWSg45g/og/yVj/RA8rD86we0/6hE="; + src = fetchFromGitHub { + owner = "pyupio"; + repo = "safety"; + rev = "refs/tags/${version}"; + hash = "sha256-vLibQfSwxZF48KL/vfkCOUi2qH5QGMySbdakLQNP+Ug="; }; postPatch = '' substituteInPlace safety/safety.py \ - --replace-fail "telemetry=True" "telemetry=False" + --replace-fail "telemetry: bool = True" "telemetry: bool = False" substituteInPlace safety/util.py \ - --replace-fail "telemetry = True" "telemetry = False" + --replace-fail "telemetry: bool = True" "telemetry: bool = False" substituteInPlace safety/cli.py \ --replace-fail "disable-optional-telemetry', default=False" \ "disable-optional-telemetry', default=True" @@ -66,24 +69,26 @@ buildPythonPackage rec { jinja2 marshmallow authlib - jwt rich typer pydantic safety-schemas typing-extensions filelock + psutil ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + git + pytestCheckHook + ]; # Disable tests depending on online services disabledTests = [ "test_announcements_if_is_not_tty" "test_check_live" - "test_check_live_cached" + "test_debug_flag" "test_get_packages_licenses_without_api_key" - "test_validate_with_policy_file_using_invalid_keyword" "test_validate_with_basic_policy_file" ];