15
0
forked from pool/python-hvac

Accepting request 1070718 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1070718
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-hvac?expand=0&rev=13
This commit is contained in:
2023-03-10 21:09:04 +00:00
committed by Git OBS Bridge
5 changed files with 23 additions and 75 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Mar 10 12:10:52 UTC 2023 - pgajdos@suse.com
- version update to 1.1.0
* python-six is not required
* drop python 2 support
* lot of changes, see CHANGELOG.md or
https://github.com/hvac/hvac/blob/develop/CHANGELOG.md
- deleted patches
- remove-mock.patch (upstreamed)
-------------------------------------------------------------------
Tue Aug 2 05:50:10 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-hvac
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,33 +16,30 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-hvac
Version: 0.11.2
Version: 1.1.0
Release: 0
Summary: HashiCorp Vault API client
License: BSD-3-Clause
URL: https://github.com/ianunruh/hvac
Source: https://github.com/hvac/hvac/archive/v%{version}.tar.gz
# PATCH-FIX-UPSTREAM Based on gh#hvac/hvac#23cd94654835134aa118805ecb4b7e5c538d04c1
Patch0: remove-mock.patch
BuildRequires: %{python_module Authlib}
BuildRequires: %{python_module Flask-SQLAlchemy}
BuildRequires: %{python_module Flask}
BuildRequires: %{python_module Werkzeug}
BuildRequires: %{python_module jwcrypto}
BuildRequires: %{python_module parameterized}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry}
BuildRequires: %{python_module pyhcl >= 0.3.10}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.21.0}
BuildRequires: %{python_module requests-mock}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.5.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pyhcl >= 0.3.10
Requires: python-requests >= 2.21.0
Requires: python-six >= 1.5.0
BuildArch: noarch
%python_subpackages
@@ -54,20 +51,21 @@ HashiCorp Vault API client for Python 2/3
# doctests and ldap need set up ldap server and that is quite an effort
rm -r tests/doctest/
rm tests/integration_tests/api/auth_methods/test_ldap.py
find hvac -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README*
%doc README.* CHANGELOG.*
%license LICENSE.txt
%{python_sitelib}/*
%{python_sitelib}/hvac*
%changelog

View File

@@ -1,61 +0,0 @@
diff --git a/tests/unit_tests/api/secrets_engines/test_kv.py b/tests/unit_tests/api/secrets_engines/test_kv.py
index 49781669..599cb65e 100644
--- a/tests/unit_tests/api/secrets_engines/test_kv.py
+++ b/tests/unit_tests/api/secrets_engines/test_kv.py
@@ -1,6 +1,6 @@
from unittest import TestCase
-from mock import MagicMock
+from unittest.mock import MagicMock
from parameterized import parameterized
from hvac.api.secrets_engines.kv import Kv
diff --git a/tests/unit_tests/api/test_vault_api_category.py b/tests/unit_tests/api/test_vault_api_category.py
index 5945187b..1f67bcb7 100644
--- a/tests/unit_tests/api/test_vault_api_category.py
+++ b/tests/unit_tests/api/test_vault_api_category.py
@@ -1,6 +1,6 @@
from unittest import TestCase
-from mock import create_autospec
+from unittest.mock import create_autospec
from hvac.adapters import Adapter
from hvac.api.vault_api_base import VaultApiBase
diff --git a/tests/unit_tests/v1/test_aws_iam_methods.py b/tests/unit_tests/v1/test_aws_iam_methods.py
index bec913b1..b5f0f84f 100644
--- a/tests/unit_tests/v1/test_aws_iam_methods.py
+++ b/tests/unit_tests/v1/test_aws_iam_methods.py
@@ -3,7 +3,7 @@
from datetime import datetime
from unittest import TestCase
-import mock
+from unittest import mock
from hvac import Client
diff --git a/tests/utils/hvac_integration_test_case.py b/tests/utils/hvac_integration_test_case.py
index 6edaca18..d81ba091 100644
--- a/tests/utils/hvac_integration_test_case.py
+++ b/tests/utils/hvac_integration_test_case.py
@@ -1,17 +1,16 @@
#!/usr/bin/env python
-# -*- coding: utf-8 -*-
import logging
import re
import warnings
-from mock import patch
+from unittest.mock import patch
from tests.utils import get_config_file_path, create_client, is_enterprise
from tests.utils.server_manager import ServerManager
import distutils.spawn
-class HvacIntegrationTestCase(object):
+class HvacIntegrationTestCase:
"""Base class intended to be used by all hvac integration test cases."""
manager = None

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08dcdedcdb055f0bde5ae329ab6bef973a8531d2b6d3d164555e84baf6344fa1
size 308694

3
v1.1.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe5721454df8fee72fab3e9174cdc314e722ed6cb600239cd2834f443f77d0ae
size 317118