about summary refs log tree commit diff
path: root/pkgs/development/python-modules/safety/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/safety/default.nix')
-rw-r--r--pkgs/development/python-modules/safety/default.nix62
1 files changed, 34 insertions, 28 deletions
diff --git a/pkgs/development/python-modules/safety/default.nix b/pkgs/development/python-modules/safety/default.nix
index 1a5e1ab8f461e..2399e4e977feb 100644
--- a/pkgs/development/python-modules/safety/default.nix
+++ b/pkgs/development/python-modules/safety/default.nix
@@ -1,30 +1,31 @@
-{ lib
-, buildPythonPackage
-, pythonOlder
-, fetchPypi
-, pythonRelaxDepsHook
-, setuptools
-, click
-, urllib3
-, requests
-, packaging
-, dparse
-, ruamel-yaml
-, jinja2
-, marshmallow
-, authlib
-, jwt
-, rich
-, typer
-, pydantic
-, safety-schemas
-, typing-extensions
-, pytestCheckHook
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchPypi,
+  pythonRelaxDepsHook,
+  setuptools,
+  click,
+  urllib3,
+  requests,
+  packaging,
+  dparse,
+  ruamel-yaml,
+  jinja2,
+  marshmallow,
+  authlib,
+  jwt,
+  rich,
+  typer,
+  pydantic,
+  safety-schemas,
+  typing-extensions,
+  pytestCheckHook,
 }:
 
 buildPythonPackage rec {
   pname = "safety";
-  version = "3.1.0";
+  version = "3.2.3";
 
   disabled = pythonOlder "3.7";
 
@@ -32,7 +33,7 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-cfR7guzhU+wvJA4nf3y/pw1douDRQxYsZ/Y7L3RZoao=";
+    hash = "sha256-QUFUk08XJ9r4pkc0k5RP7LOAVAw/AIddwa43c4L32D8=";
   };
 
   postPatch = ''
@@ -78,9 +79,7 @@ buildPythonPackage rec {
     typing-extensions
   ];
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
+  nativeCheckInputs = [ pytestCheckHook ];
 
   # Disable tests depending on online services
   disabledTests = [
@@ -89,8 +88,12 @@ buildPythonPackage rec {
     "test_check_live_cached"
     "test_get_packages_licenses_without_api_key"
     "test_validate_with_policy_file_using_invalid_keyword"
+    "test_validate_with_basic_policy_file"
   ];
 
+  # ImportError: cannot import name 'get_command_for' from partially initialized module 'safety.cli_util' (most likely due to a circular import)
+  disabledTestPaths = [ "tests/alerts/test_utils.py" ];
+
   preCheck = ''
     export HOME=$(mktemp -d)
   '';
@@ -101,6 +104,9 @@ buildPythonPackage rec {
     homepage = "https://github.com/pyupio/safety";
     changelog = "https://github.com/pyupio/safety/blob/${version}/CHANGELOG.md";
     license = licenses.mit;
-    maintainers = with maintainers; [ thomasdesr dotlambda ];
+    maintainers = with maintainers; [
+      thomasdesr
+      dotlambda
+    ];
   };
 }