Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-hcloud for openSUSE:Factory checked in at 2022-08-02 22:09:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hcloud (Old) and /work/SRC/openSUSE:Factory/.python-hcloud.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hcloud" Tue Aug 2 22:09:11 2022 rev:3 rq:992132 version:1.17.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hcloud/python-hcloud.changes 2022-03-21 20:13:28.812526875 +0100 +++ /work/SRC/openSUSE:Factory/.python-hcloud.new.1533/python-hcloud.changes 2022-08-02 22:09:48.881880208 +0200 @@ -1,0 +2,8 @@ +Tue Aug 2 05:01:14 UTC 2022 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 1.17.0: + * Add suport for primary IPs +- Add patch remove-mock.patch: + * Use unittest.mock. + +------------------------------------------------------------------- Old: ---- hcloud-1.16.0.tar.gz New: ---- hcloud-1.17.0.tar.gz remove-mock.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hcloud.spec ++++++ --- /var/tmp/diff_new_pack.0YxL1p/_old 2022-08-02 22:09:49.281881361 +0200 +++ /var/tmp/diff_new_pack.0YxL1p/_new 2022-08-02 22:09:49.285881373 +0200 @@ -18,13 +18,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-hcloud -Version: 1.16.0 +Version: 1.17.0 Release: 0 Summary: Hetzner Cloud Python library License: MIT -Group: Development/Languages/Python 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 setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -34,7 +35,6 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module future >= 0.17.1} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil >= 2.7.5} BuildRequires: %{python_module requests >= 2.20} @@ -45,7 +45,7 @@ Official Hetzner Cloud Python library. %prep -%setup -q -n hcloud-%{version} +%autosetup -p1 -n hcloud-%{version} %build %python_build @@ -55,8 +55,6 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# https://github.com/hetznercloud/hcloud-python/issues/151 -sed -i 's:import mock:import unittest.mock as mock:' tests/*.py tests/*/*.py export LANG=en_US.UTF-8 %pytest tests/unit/ ++++++ hcloud-1.16.0.tar.gz -> hcloud-1.17.0.tar.gz ++++++ ++++ 2828 lines of diff (skipped) ++++++ remove-mock.patch ++++++ >From 46a8eb17f8c6cd81635708d80aaa3a8357c5fb03 Mon Sep 17 00:00:00 2001 From: Steve Kowalik <ste...@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