forked from pool/python-hcloud
- Update to 1.28.0:
* add load balancer target health status field * implement resource actions clients * missing long_description content_type in setup.py * add global request timeout option * reexport references in parent ressources modules * the package is now typed * allow omitting datacenter when creating a primary ip * invalid attribute in placement group * add repr method to domains * drop support for python 3.7 * add details to raise exceptions * move hcloud.hcloud module to hcloud._client * revert remove python-dateutil dependency * handle Z timezone in ISO8601 datetime format * isos: invalid name for include_wildcard_architecture argument * network: add field expose_routes_to_vswitch * setup exception hierarchy * add deprecation field to ServerType * adjust label validation for max length of 63 characters * server_type: add field for included traffic * feat: add support for ARM APIs by @apricote * fix: remove unused future dependency by @apricote * Remove use of external mock module by @s-t-e-v-e-n-k * Add validation helper for Label Values/Keys by @LKaemmerling - Switch to pyproject macros. - Drop patch remove-mock.patch, included upstream. - Stop using greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hcloud?expand=0&rev=7
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f8142e0438be277c6fa1ddee13aecd5da152b48c6dec7fd4970def1b5dc219e2
|
||||
size 97841
|
||||
3
hcloud-1.28.0.tar.gz
Normal file
3
hcloud-1.28.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:04cea2cb77528e2cbae6e2e2d58af5aaf696727ac4fcb41fc859192ebcc3f29c
|
||||
size 107242
|
||||
@@ -1,3 +1,35 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 1 01:43:20 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 1.28.0:
|
||||
* add load balancer target health status field
|
||||
* implement resource actions clients
|
||||
* missing long_description content_type in setup.py
|
||||
* add global request timeout option
|
||||
* reexport references in parent ressources modules
|
||||
* the package is now typed
|
||||
* allow omitting datacenter when creating a primary ip
|
||||
* invalid attribute in placement group
|
||||
* add repr method to domains
|
||||
* drop support for python 3.7
|
||||
* add details to raise exceptions
|
||||
* move hcloud.hcloud module to hcloud._client
|
||||
* revert remove python-dateutil dependency
|
||||
* handle Z timezone in ISO8601 datetime format
|
||||
* isos: invalid name for include_wildcard_architecture argument
|
||||
* network: add field expose_routes_to_vswitch
|
||||
* setup exception hierarchy
|
||||
* add deprecation field to ServerType
|
||||
* adjust label validation for max length of 63 characters
|
||||
* server_type: add field for included traffic
|
||||
* feat: add support for ARM APIs by @apricote
|
||||
* fix: remove unused future dependency by @apricote
|
||||
* Remove use of external mock module by @s-t-e-v-e-n-k
|
||||
* Add validation helper for Label Values/Keys by @LKaemmerling
|
||||
- Switch to pyproject macros.
|
||||
- Drop patch remove-mock.patch, included upstream.
|
||||
- Stop using greedy globs in %files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 2 05:01:14 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-hcloud
|
||||
#
|
||||
# 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,25 +16,23 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-hcloud
|
||||
Version: 1.17.0
|
||||
Version: 1.28.0
|
||||
Release: 0
|
||||
Summary: Hetzner Cloud Python library
|
||||
License: MIT
|
||||
URL: https://github.com/hetznercloud/hcloud-python
|
||||
Source: https://files.pythonhosted.org/packages/source/h/hcloud/hcloud-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM gh#hetznercloud/hcloud-python#162
|
||||
Patch0: remove-mock.patch
|
||||
BuildRequires: %{python_module base >= 3.8}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-future >= 0.17.1
|
||||
Requires: python-python-dateutil >= 2.7.5
|
||||
Requires: python-requests >= 2.20
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module future >= 0.17.1}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module python-dateutil >= 2.7.5}
|
||||
BuildRequires: %{python_module requests >= 2.20}
|
||||
@@ -48,10 +46,10 @@ Official Hetzner Cloud Python library.
|
||||
%autosetup -p1 -n hcloud-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@@ -59,8 +57,9 @@ export LANG=en_US.UTF-8
|
||||
%pytest tests/unit/
|
||||
|
||||
%files %{python_files}
|
||||
%doc CHANGELOG.rst README.rst
|
||||
%doc CHANGELOG.md README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/hcloud
|
||||
%{python_sitelib}/hcloud-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
From 46a8eb17f8c6cd81635708d80aaa3a8357c5fb03 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
Date: Tue, 2 Aug 2022 14:53:06 +1000
|
||||
Subject: [PATCH] Remove use of external mock module
|
||||
|
||||
Python since 3.4 has included mock in the standard library, under the
|
||||
unittest module. Since the lowest version supported is greater than
|
||||
that, we can switch to using it and drop one external requirement.
|
||||
---
|
||||
requirements/test.txt | 1 -
|
||||
tests/unit/actions/test_client.py | 2 +-
|
||||
tests/unit/certificates/test_client.py | 2 +-
|
||||
tests/unit/conftest.py | 2 +-
|
||||
tests/unit/core/test_client.py | 2 +-
|
||||
tests/unit/datacenters/test_client.py | 2 +-
|
||||
tests/unit/firewalls/test_client.py | 2 +-
|
||||
tests/unit/floating_ips/test_client.py | 2 +-
|
||||
tests/unit/images/test_client.py | 2 +-
|
||||
tests/unit/isos/test_client.py | 2 +-
|
||||
tests/unit/load_balancer_types/test_client.py | 2 +-
|
||||
tests/unit/load_balancers/test_client.py | 2 +-
|
||||
tests/unit/locations/test_client.py | 2 +-
|
||||
tests/unit/networks/test_client.py | 2 +-
|
||||
tests/unit/placement_groups/test_client.py | 2 +-
|
||||
tests/unit/primary_ips/test_client.py | 2 +-
|
||||
tests/unit/server_types/test_client.py | 2 +-
|
||||
tests/unit/servers/test_client.py | 2 +-
|
||||
tests/unit/ssh_keys/test_client.py | 2 +-
|
||||
tests/unit/volumes/test_client.py | 2 +-
|
||||
20 files changed, 19 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/tests/unit/actions/test_client.py b/tests/unit/actions/test_client.py
|
||||
index d16ec4a..8ee7fe6 100644
|
||||
--- a/tests/unit/actions/test_client.py
|
||||
+++ b/tests/unit/actions/test_client.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from hcloud.actions.client import ActionsClient, BoundAction
|
||||
diff --git a/tests/unit/certificates/test_client.py b/tests/unit/certificates/test_client.py
|
||||
index b2acd4e..3090ff2 100644
|
||||
--- a/tests/unit/certificates/test_client.py
|
||||
+++ b/tests/unit/certificates/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.actions.client import BoundAction
|
||||
from hcloud.certificates.client import CertificatesClient, BoundCertificate
|
||||
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
|
||||
index 17c9d62..f40734d 100644
|
||||
--- a/tests/unit/conftest.py
|
||||
+++ b/tests/unit/conftest.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
from hcloud import Client
|
||||
|
||||
diff --git a/tests/unit/core/test_client.py b/tests/unit/core/test_client.py
|
||||
index feabf82..7c5aa36 100644
|
||||
--- a/tests/unit/core/test_client.py
|
||||
+++ b/tests/unit/core/test_client.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from hcloud.core.client import BoundModelBase, ClientEntityBase, GetEntityByNameMixin
|
||||
diff --git a/tests/unit/datacenters/test_client.py b/tests/unit/datacenters/test_client.py
|
||||
index 3e24e92..a34fe8a 100644
|
||||
--- a/tests/unit/datacenters/test_client.py
|
||||
+++ b/tests/unit/datacenters/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest # noqa: F401
|
||||
-import mock # noqa: F401
|
||||
+from unittest import mock # noqa: F401
|
||||
|
||||
from hcloud.datacenters.client import DatacentersClient, BoundDatacenter
|
||||
from hcloud.datacenters.domain import DatacenterServerTypes
|
||||
diff --git a/tests/unit/firewalls/test_client.py b/tests/unit/firewalls/test_client.py
|
||||
index ab564ea..95311c2 100644
|
||||
--- a/tests/unit/firewalls/test_client.py
|
||||
+++ b/tests/unit/firewalls/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.firewalls.client import FirewallsClient, BoundFirewall
|
||||
from hcloud.actions.client import BoundAction
|
||||
diff --git a/tests/unit/floating_ips/test_client.py b/tests/unit/floating_ips/test_client.py
|
||||
index 79ce8df..97fcd28 100644
|
||||
--- a/tests/unit/floating_ips/test_client.py
|
||||
+++ b/tests/unit/floating_ips/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.actions.client import BoundAction
|
||||
from hcloud.servers.client import BoundServer
|
||||
diff --git a/tests/unit/images/test_client.py b/tests/unit/images/test_client.py
|
||||
index 521ad1f..55ec9ba 100644
|
||||
--- a/tests/unit/images/test_client.py
|
||||
+++ b/tests/unit/images/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import datetime
|
||||
from dateutil.tz import tzoffset
|
||||
|
||||
diff --git a/tests/unit/isos/test_client.py b/tests/unit/isos/test_client.py
|
||||
index 32a2a51..4bb4d37 100644
|
||||
--- a/tests/unit/isos/test_client.py
|
||||
+++ b/tests/unit/isos/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import datetime
|
||||
from dateutil.tz import tzoffset
|
||||
|
||||
diff --git a/tests/unit/load_balancer_types/test_client.py b/tests/unit/load_balancer_types/test_client.py
|
||||
index 565ce61..b9686ad 100644
|
||||
--- a/tests/unit/load_balancer_types/test_client.py
|
||||
+++ b/tests/unit/load_balancer_types/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
|
||||
from hcloud.load_balancer_types.client import LoadBalancerTypesClient
|
||||
diff --git a/tests/unit/load_balancers/test_client.py b/tests/unit/load_balancers/test_client.py
|
||||
index 97a765a..b2c05a5 100644
|
||||
--- a/tests/unit/load_balancers/test_client.py
|
||||
+++ b/tests/unit/load_balancers/test_client.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from hcloud.load_balancer_types.domain import LoadBalancerType
|
||||
diff --git a/tests/unit/locations/test_client.py b/tests/unit/locations/test_client.py
|
||||
index 8b4d5ab..217d6ae 100644
|
||||
--- a/tests/unit/locations/test_client.py
|
||||
+++ b/tests/unit/locations/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest # noqa: F401
|
||||
-import mock # noqa: F401
|
||||
+from unittest import mock # noqa: F401
|
||||
|
||||
from hcloud.locations.client import LocationsClient
|
||||
|
||||
diff --git a/tests/unit/networks/test_client.py b/tests/unit/networks/test_client.py
|
||||
index 062d156..81c12dc 100644
|
||||
--- a/tests/unit/networks/test_client.py
|
||||
+++ b/tests/unit/networks/test_client.py
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
from dateutil.parser import isoparse
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.actions.client import BoundAction
|
||||
from hcloud.networks.client import BoundNetwork, NetworksClient
|
||||
diff --git a/tests/unit/placement_groups/test_client.py b/tests/unit/placement_groups/test_client.py
|
||||
index 674ce32..aecea55 100644
|
||||
--- a/tests/unit/placement_groups/test_client.py
|
||||
+++ b/tests/unit/placement_groups/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.placement_groups.client import BoundPlacementGroup, PlacementGroupsClient
|
||||
|
||||
diff --git a/tests/unit/primary_ips/test_client.py b/tests/unit/primary_ips/test_client.py
|
||||
index 1611cc3..2624f92 100644
|
||||
--- a/tests/unit/primary_ips/test_client.py
|
||||
+++ b/tests/unit/primary_ips/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.primary_ips.client import PrimaryIPsClient, BoundPrimaryIP
|
||||
from hcloud.primary_ips.domain import PrimaryIP
|
||||
diff --git a/tests/unit/server_types/test_client.py b/tests/unit/server_types/test_client.py
|
||||
index a12a3e8..10c07c2 100644
|
||||
--- a/tests/unit/server_types/test_client.py
|
||||
+++ b/tests/unit/server_types/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
|
||||
from hcloud.server_types.client import ServerTypesClient
|
||||
diff --git a/tests/unit/servers/test_client.py b/tests/unit/servers/test_client.py
|
||||
index b92e9ff..c8bf249 100644
|
||||
--- a/tests/unit/servers/test_client.py
|
||||
+++ b/tests/unit/servers/test_client.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
import pytest
|
||||
|
||||
from hcloud.firewalls.client import BoundFirewall
|
||||
diff --git a/tests/unit/ssh_keys/test_client.py b/tests/unit/ssh_keys/test_client.py
|
||||
index 6562304..01ab9e0 100644
|
||||
--- a/tests/unit/ssh_keys/test_client.py
|
||||
+++ b/tests/unit/ssh_keys/test_client.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.ssh_keys.client import SSHKeysClient, BoundSSHKey
|
||||
from hcloud.ssh_keys.domain import SSHKey
|
||||
diff --git a/tests/unit/volumes/test_client.py b/tests/unit/volumes/test_client.py
|
||||
index a075ad5..7145194 100644
|
||||
--- a/tests/unit/volumes/test_client.py
|
||||
+++ b/tests/unit/volumes/test_client.py
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
from dateutil.parser import isoparse
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from hcloud.actions.client import BoundAction
|
||||
from hcloud.servers.client import BoundServer
|
||||
Reference in New Issue
Block a user