From d3e7535b1e28341c8165d1c388e8c56654f5995f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 15 Jul 2026 14:15:55 -0700 Subject: [PATCH] python3Packages.swagger-spec-validator: replace importlib_resources with importlib.resources --- .../swagger-spec-validator/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/swagger-spec-validator/default.nix b/pkgs/development/python-modules/swagger-spec-validator/default.nix index 32c145b8276d..d7754089ea0e 100644 --- a/pkgs/development/python-modules/swagger-spec-validator/default.nix +++ b/pkgs/development/python-modules/swagger-spec-validator/default.nix @@ -3,12 +3,10 @@ buildPythonPackage, fetchFromGitHub, setuptools, - importlib-resources, jsonschema, pyyaml, - six, pytestCheckHook, - mock, + typing-extensions, }: buildPythonPackage (finalAttrs: { @@ -23,18 +21,26 @@ buildPythonPackage (finalAttrs: { hash = "sha256-8T0973g8JZKLCTpYqyScr/JAiFdBexEReUJoMQh4vO4="; }; + postPatch = '' + # https://github.com/Yelp/swagger_spec_validator/pull/176 + substituteInPlace swagger_spec_validator/common.py tests/common_test.py \ + --replace-fail "import importlib_resources" "import importlib.resources as importlib_resources" + ''; + build-system = [ setuptools ]; + pythonRemoveDeps = [ + "importlib-resources" + ]; + dependencies = [ pyyaml - importlib-resources jsonschema - six + typing-extensions ]; nativeCheckInputs = [ pytestCheckHook - mock ]; pythonImportsCheck = [ "swagger_spec_validator" ];