From 70de8db0dddc2c785f75ef74071b6fb1417a52f1 Mon Sep 17 00:00:00 2001 From: Priyanshu Tripathi Date: Thu, 26 Jun 2025 07:43:41 -0400 Subject: [PATCH] python3Packages.jenkinsapi: fix build --- .../python-modules/jenkinsapi/default.nix | 12 ++++---- .../jenkinsapi/pytest-warn-none.patch | 30 ------------------- 2 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 pkgs/development/python-modules/jenkinsapi/pytest-warn-none.patch diff --git a/pkgs/development/python-modules/jenkinsapi/default.nix b/pkgs/development/python-modules/jenkinsapi/default.nix index 94a2c4319bc1..15ef6f73b3d6 100644 --- a/pkgs/development/python-modules/jenkinsapi/default.nix +++ b/pkgs/development/python-modules/jenkinsapi/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, flit-core, mock, pbr, @@ -18,13 +18,13 @@ buildPythonPackage rec { version = "0.3.14"; format = "pyproject"; - src = fetchPypi { - inherit pname version; - hash = "sha256-G+Wj1gu5e4/VqdnUR34iAeB+RyWn1CwOsWhGu4eeS5c="; + src = fetchFromGitHub { + owner = "pycontribs"; + repo = "jenkinsapi"; + tag = version; + hash = "sha256-s6yamzH+4tobO8gLFVn+5ZZUnmPja675FXQmIjAb/co="; }; - patches = [ ./pytest-warn-none.patch ]; - nativeBuildInputs = [ flit-core pbr diff --git a/pkgs/development/python-modules/jenkinsapi/pytest-warn-none.patch b/pkgs/development/python-modules/jenkinsapi/pytest-warn-none.patch deleted file mode 100644 index 7f9a732bbcb3..000000000000 --- a/pkgs/development/python-modules/jenkinsapi/pytest-warn-none.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/jenkinsapi_tests/unittests/test_build.py b/jenkinsapi_tests/unittests/test_build.py -index 2e2c2f4..9de816a 100644 ---- a/jenkinsapi_tests/unittests/test_build.py -+++ b/jenkinsapi_tests/unittests/test_build.py -@@ -3,6 +3,7 @@ import pytest - import pytz - from . import configs - import datetime -+import warnings - from jenkinsapi.build import Build - from jenkinsapi.job import Job - -@@ -252,7 +253,7 @@ def test_build_env_vars_wo_injected_env_vars_plugin(monkeypatch, build): - monkeypatch.setattr(Build, "get_data", fake_get_data) - - with pytest.raises(requests.HTTPError) as excinfo: -- with pytest.warns(None) as record: -+ with warnings.catch_warnings(record=True) as record: - build.get_env_vars() - assert "404" == str(excinfo.value) - assert len(record) == 1 -@@ -269,7 +270,7 @@ def test_build_env_vars_other_exception(monkeypatch, build): - monkeypatch.setattr(Build, "get_data", fake_get_data) - - with pytest.raises(Exception) as excinfo: -- with pytest.warns(None) as record: -+ with warnings.catch_warnings(record=True) as record: - build.get_env_vars() - assert "" == str(excinfo.value) - assert len(record) == 0