Skip to content

Commit 555da02

Browse files
authored
python313Packages.safety: 3.2.14 -> 3.3.0 (#383561)
2 parents bf7aecc + ade1713 commit 555da02

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

pkgs/development/python-modules/safety-schemas/default.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@
1212

1313
buildPythonPackage rec {
1414
pname = "safety-schemas";
15-
version = "0.0.10";
15+
version = "0.0.11";
1616
pyproject = true;
1717

1818
src = fetchPypi {
1919
pname = "safety_schemas";
2020
inherit version;
21-
hash = "sha256-Xsg7sZ4XADdI0qSxHkPh8rRHHJQ0Mp6aDYDRBplmuWw=";
21+
hash = "sha256-EIBDcuB3ylqV50DMUH5z2Rc2YyhABvyq9XVheboTrJ0=";
2222
};
2323

24+
postPatch = ''
25+
substituteInPlace pyproject.toml \
26+
--replace hatchling==1.26.3 hatchling
27+
'';
28+
2429
build-system = [ hatchling ];
2530

2631
pythonRelaxDeps = [

pkgs/development/python-modules/safety/default.nix

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
buildPythonPackage,
44
pythonOlder,
55
fetchFromGitHub,
6+
hatchling,
67
setuptools,
78
click,
8-
urllib3,
99
requests,
1010
packaging,
1111
dparse,
1212
ruamel-yaml,
1313
jinja2,
14+
levenshtein,
1415
marshmallow,
1516
authlib,
16-
rich,
1717
typer,
1818
pydantic,
1919
safety-schemas,
@@ -22,11 +22,12 @@
2222
psutil,
2323
git,
2424
pytestCheckHook,
25+
tomli,
2526
}:
2627

2728
buildPythonPackage rec {
2829
pname = "safety";
29-
version = "3.2.14";
30+
version = "3.3.0";
3031

3132
disabled = pythonOlder "3.8";
3233

@@ -36,10 +37,13 @@ buildPythonPackage rec {
3637
owner = "pyupio";
3738
repo = "safety";
3839
tag = version;
39-
hash = "sha256-/RB+ota6dnlbJvtOOoIOHD+BjBzZIJRhEOAUQggUgB4=";
40+
hash = "sha256-K41ytQhOP3RJ83fbd15cRJD9bAQs+wRnDIBC6XR1bOE=";
4041
};
4142

4243
postPatch = ''
44+
substituteInPlace pyproject.toml \
45+
--replace-fail python-levenshtein levenshtein
46+
4347
substituteInPlace safety/safety.py \
4448
--replace-fail "telemetry: bool = True" "telemetry: bool = False"
4549
substituteInPlace safety/util.py \
@@ -51,24 +55,24 @@ buildPythonPackage rec {
5155
--replace-fail "telemetry=True" "telemetry=False"
5256
'';
5357

54-
build-system = [ setuptools ];
58+
build-system = [ hatchling ];
5559

5660
pythonRelaxDeps = [
5761
"pydantic"
62+
"safety-schemas"
5863
];
5964

6065
dependencies = [
6166
setuptools
6267
click
63-
urllib3
6468
requests
6569
packaging
6670
dparse
6771
ruamel-yaml
6872
jinja2
73+
levenshtein
6974
marshmallow
7075
authlib
71-
rich
7276
typer
7377
pydantic
7478
safety-schemas
@@ -80,14 +84,16 @@ buildPythonPackage rec {
8084
nativeCheckInputs = [
8185
git
8286
pytestCheckHook
87+
tomli
8388
];
8489

85-
# Disable tests depending on online services
8690
disabledTests = [
91+
# Disable tests depending on online services
8792
"test_announcements_if_is_not_tty"
8893
"test_check_live"
8994
"test_debug_flag"
9095
"test_get_packages_licenses_without_api_key"
96+
"test_init_project"
9197
"test_validate_with_basic_policy_file"
9298
];
9399

0 commit comments

Comments
 (0)