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 2025-09-29 16:34:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hcloud (Old) and /work/SRC/openSUSE:Factory/.python-hcloud.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hcloud" Mon Sep 29 16:34:06 2025 rev:11 rq:1307688 version:2.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hcloud/python-hcloud.changes 2025-09-25 18:48:03.953128796 +0200 +++ /work/SRC/openSUSE:Factory/.python-hcloud.new.11973/python-hcloud.changes 2025-09-29 16:36:22.772879149 +0200 @@ -1,0 +2,6 @@ +Mon Sep 29 06:53:10 UTC 2025 - John Paul Adrian Glaubitz <[email protected]> + +- Update to 2.7.0 + * per location server types (#558) + +------------------------------------------------------------------- Old: ---- hcloud-2.6.0.tar.gz New: ---- hcloud-2.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hcloud.spec ++++++ --- /var/tmp/diff_new_pack.45FGfh/_old 2025-09-29 16:36:23.212897584 +0200 +++ /var/tmp/diff_new_pack.45FGfh/_new 2025-09-29 16:36:23.212897584 +0200 @@ -17,7 +17,7 @@ %{?sle15_python_module_pythons} Name: python-hcloud -Version: 2.6.0 +Version: 2.7.0 Release: 0 Summary: Hetzner Cloud Python library License: MIT ++++++ hcloud-2.6.0.tar.gz -> hcloud-2.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/CHANGELOG.md new/hcloud-2.7.0/CHANGELOG.md --- old/hcloud-2.6.0/CHANGELOG.md 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/CHANGELOG.md 2025-09-26 10:03:22.000000000 +0200 @@ -1,5 +1,45 @@ # Changelog +## [v2.7.0](https://github.com/hetznercloud/hcloud-python/releases/tag/v2.7.0) + +[Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). + +- We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. + +- We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. + +See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. + +**Upgrading** + +```py +# Before +def validate_server_type(server_type: ServerType): + if server_type.deprecation is not None: + raise ValueError(f"server type {server_type.name} is deprecated") +``` + +```py +# After +def validate_server_type(server_type: ServerType, location: Location): + found = [o for o in server_type.locations if location.name == o.location.name] + if not found: + raise ValueError( + f"server type {server_type.name} is not supported in location {location.name}" + ) + + server_type_location = found[0] + + if server_type_location.deprecation is not None: + raise ValueError( + f"server type {server_type.name} is deprecated in location {location.name}" + ) +``` + +### Features + +- per location server types (#558) + ## [v2.6.0](https://github.com/hetznercloud/hcloud-python/releases/tag/v2.6.0) ### Features diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/PKG-INFO new/hcloud-2.7.0/PKG-INFO --- old/hcloud-2.6.0/PKG-INFO 2025-09-08 12:14:21.503902000 +0200 +++ new/hcloud-2.7.0/PKG-INFO 2025-09-26 10:03:33.637841000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: hcloud -Version: 2.6.0 +Version: 2.7.0 Summary: Official Hetzner Cloud python library Home-page: https://github.com/hetznercloud/hcloud-python Author: Hetzner Cloud GmbH @@ -34,8 +34,8 @@ Requires-Dist: coverage<7.11,>=7.10; extra == "test" Requires-Dist: pylint<3.4,>=3; extra == "test" Requires-Dist: pytest<8.5,>=8; extra == "test" -Requires-Dist: pytest-cov<6.4,>=6; extra == "test" -Requires-Dist: mypy<1.18,>=1.17; extra == "test" +Requires-Dist: pytest-cov<7.1,>=7; extra == "test" +Requires-Dist: mypy<1.19,>=1.18; extra == "test" Requires-Dist: types-python-dateutil; extra == "test" Requires-Dist: types-requests; extra == "test" Dynamic: author @@ -121,12 +121,17 @@ public beta). During an experimental phase, breaking changes on those features may occur within minor releases. +The stability of experimental features is not related to the stability of its upstream API. + +Experimental features have different levels of maturity (e.g. experimental, alpha, beta) +based on the maturity of the upstream API. + While experimental features will be announced in the release notes, you can also find whether a python class or function is experimental in its docstring: ``` Experimental: - $PRODUCT is experimental, breaking changes may occur within minor releases. + $PRODUCT is $MATURITY, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#$SLUG for more details. ``` @@ -206,7 +211,7 @@ ```py """ Experimental: - $PRODUCT is experimental, breaking changes may occur within minor releases. + $PRODUCT is $MATURITY, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#$SLUG for more details. """ ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/README.md new/hcloud-2.7.0/README.md --- old/hcloud-2.6.0/README.md 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/README.md 2025-09-26 10:03:22.000000000 +0200 @@ -66,12 +66,17 @@ public beta). During an experimental phase, breaking changes on those features may occur within minor releases. +The stability of experimental features is not related to the stability of its upstream API. + +Experimental features have different levels of maturity (e.g. experimental, alpha, beta) +based on the maturity of the upstream API. + While experimental features will be announced in the release notes, you can also find whether a python class or function is experimental in its docstring: ``` Experimental: - $PRODUCT is experimental, breaking changes may occur within minor releases. + $PRODUCT is $MATURITY, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#$SLUG for more details. ``` @@ -151,7 +156,7 @@ ```py """ Experimental: - $PRODUCT is experimental, breaking changes may occur within minor releases. + $PRODUCT is $MATURITY, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#$SLUG for more details. """ ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/hcloud/_version.py new/hcloud-2.7.0/hcloud/_version.py --- old/hcloud-2.6.0/hcloud/_version.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/hcloud/_version.py 2025-09-26 10:03:22.000000000 +0200 @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.6.0" # x-releaser-pleaser-version +__version__ = "2.7.0" # x-releaser-pleaser-version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/hcloud/server_types/__init__.py new/hcloud-2.7.0/hcloud/server_types/__init__.py --- old/hcloud-2.6.0/hcloud/server_types/__init__.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/hcloud/server_types/__init__.py 2025-09-26 10:03:22.000000000 +0200 @@ -5,11 +5,12 @@ ServerTypesClient, ServerTypesPageResult, ) -from .domain import ServerType +from .domain import ServerType, ServerTypeLocation __all__ = [ "BoundServerType", "ServerType", + "ServerTypeLocation", "ServerTypesClient", "ServerTypesPageResult", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/hcloud/server_types/client.py new/hcloud-2.7.0/hcloud/server_types/client.py --- old/hcloud-2.6.0/hcloud/server_types/client.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/hcloud/server_types/client.py 2025-09-26 10:03:22.000000000 +0200 @@ -3,7 +3,8 @@ from typing import Any, NamedTuple from ..core import BoundModelBase, Meta, ResourceClientBase -from .domain import ServerType +from ..locations import BoundLocation +from .domain import ServerType, ServerTypeLocation class BoundServerType(BoundModelBase, ServerType): @@ -11,6 +12,28 @@ model = ServerType + def __init__( + self, + client: ServerTypesClient, + data: dict, + complete: bool = True, + ): + raw = data.get("locations") + if raw is not None: + data["locations"] = [ + ServerTypeLocation.from_dict( + { + "location": BoundLocation( + client._parent.locations, o, complete=False + ), + **o, + } + ) + for o in raw + ] + + super().__init__(client, data, complete) + class ServerTypesPageResult(NamedTuple): server_types: list[BoundServerType] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/hcloud/server_types/domain.py new/hcloud-2.7.0/hcloud/server_types/domain.py --- old/hcloud-2.6.0/hcloud/server_types/domain.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/hcloud/server_types/domain.py 2025-09-26 10:03:22.000000000 +0200 @@ -4,6 +4,7 @@ from ..core import BaseDomain, DomainIdentityMixin from ..deprecation import DeprecationInfo +from ..locations import BoundLocation class ServerType(BaseDomain, DomainIdentityMixin): @@ -38,6 +39,7 @@ deprecated. If it has a value, it is considered deprecated. :param included_traffic: int Free traffic per month in bytes + :param locations: Supported Location of the Server Type. """ __properties__ = ( @@ -52,18 +54,22 @@ "storage_type", "cpu_type", "architecture", - "deprecated", - "deprecation", + "locations", ) __api_properties__ = ( *__properties__, + "deprecated", + "deprecation", "included_traffic", ) __slots__ = ( *__properties__, + "_deprecated", + "_deprecation", "_included_traffic", ) + # pylint: disable=too-many-locals def __init__( self, id: int | None = None, @@ -80,6 +86,7 @@ deprecated: bool | None = None, deprecation: dict | None = None, included_traffic: int | None = None, + locations: list[ServerTypeLocation] | None = None, ): self.id = id self.name = name @@ -92,6 +99,8 @@ self.storage_type = storage_type self.cpu_type = cpu_type self.architecture = architecture + self.locations = locations + self.deprecated = deprecated self.deprecation = ( DeprecationInfo.from_dict(deprecation) if deprecation is not None else None @@ -99,6 +108,50 @@ self.included_traffic = included_traffic @property + def deprecated(self) -> bool | None: + """ + .. deprecated:: 2.6.0 + The 'deprecated' property is deprecated and will gradually be phased starting 24 September 2025. + Please refer to the '.locations[].deprecation' property instead. + + See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types. + """ + warnings.warn( + "The 'deprecated' property is deprecated and will gradually be phased starting 24 September 2025. " + "Please refer to the '.locations[].deprecation' property instead. " + "See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types", + DeprecationWarning, + stacklevel=2, + ) + return self._deprecated + + @deprecated.setter + def deprecated(self, value: bool | None) -> None: + self._deprecated = value + + @property + def deprecation(self) -> DeprecationInfo | None: + """ + .. deprecated:: 2.6.0 + The 'deprecation' property is deprecated and will gradually be phased starting 24 September 2025. + Please refer to the '.locations[].deprecation' property instead. + + See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types. + """ + warnings.warn( + "The 'deprecation' property is deprecated and will gradually be phased starting 24 September 2025. " + "Please refer to the '.locations[].deprecation' property instead. " + "See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types", + DeprecationWarning, + stacklevel=2, + ) + return self._deprecation + + @deprecation.setter + def deprecation(self, value: DeprecationInfo | None) -> None: + self._deprecation = value + + @property def included_traffic(self) -> int | None: """ .. deprecated:: 2.1.0 @@ -119,3 +172,28 @@ @included_traffic.setter def included_traffic(self, value: int | None) -> None: self._included_traffic = value + + +class ServerTypeLocation(BaseDomain): + """Server Type Location Domain + + :param location: Location of the Server Type. + :param deprecation: Wether the Server Type is deprecated in this Location. + """ + + __api_properties__ = ( + "location", + "deprecation", + ) + __slots__ = __api_properties__ + + def __init__( + self, + *, + location: BoundLocation, + deprecation: dict | None, + ): + self.location = location + self.deprecation = ( + DeprecationInfo.from_dict(deprecation) if deprecation is not None else None + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/hcloud.egg-info/PKG-INFO new/hcloud-2.7.0/hcloud.egg-info/PKG-INFO --- old/hcloud-2.6.0/hcloud.egg-info/PKG-INFO 2025-09-08 12:14:21.000000000 +0200 +++ new/hcloud-2.7.0/hcloud.egg-info/PKG-INFO 2025-09-26 10:03:33.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: hcloud -Version: 2.6.0 +Version: 2.7.0 Summary: Official Hetzner Cloud python library Home-page: https://github.com/hetznercloud/hcloud-python Author: Hetzner Cloud GmbH @@ -34,8 +34,8 @@ Requires-Dist: coverage<7.11,>=7.10; extra == "test" Requires-Dist: pylint<3.4,>=3; extra == "test" Requires-Dist: pytest<8.5,>=8; extra == "test" -Requires-Dist: pytest-cov<6.4,>=6; extra == "test" -Requires-Dist: mypy<1.18,>=1.17; extra == "test" +Requires-Dist: pytest-cov<7.1,>=7; extra == "test" +Requires-Dist: mypy<1.19,>=1.18; extra == "test" Requires-Dist: types-python-dateutil; extra == "test" Requires-Dist: types-requests; extra == "test" Dynamic: author @@ -121,12 +121,17 @@ public beta). During an experimental phase, breaking changes on those features may occur within minor releases. +The stability of experimental features is not related to the stability of its upstream API. + +Experimental features have different levels of maturity (e.g. experimental, alpha, beta) +based on the maturity of the upstream API. + While experimental features will be announced in the release notes, you can also find whether a python class or function is experimental in its docstring: ``` Experimental: - $PRODUCT is experimental, breaking changes may occur within minor releases. + $PRODUCT is $MATURITY, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#$SLUG for more details. ``` @@ -206,7 +211,7 @@ ```py """ Experimental: - $PRODUCT is experimental, breaking changes may occur within minor releases. + $PRODUCT is $MATURITY, breaking changes may occur within minor releases. See https://docs.hetzner.cloud/changelog#$SLUG for more details. """ ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/hcloud.egg-info/requires.txt new/hcloud-2.7.0/hcloud.egg-info/requires.txt --- old/hcloud-2.6.0/hcloud.egg-info/requires.txt 2025-09-08 12:14:21.000000000 +0200 +++ new/hcloud-2.7.0/hcloud.egg-info/requires.txt 2025-09-26 10:03:33.000000000 +0200 @@ -11,7 +11,7 @@ coverage<7.11,>=7.10 pylint<3.4,>=3 pytest<8.5,>=8 -pytest-cov<6.4,>=6 -mypy<1.18,>=1.17 +pytest-cov<7.1,>=7 +mypy<1.19,>=1.18 types-python-dateutil types-requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/setup.py new/hcloud-2.7.0/setup.py --- old/hcloud-2.6.0/setup.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/setup.py 2025-09-26 10:03:22.000000000 +0200 @@ -7,7 +7,7 @@ setup( name="hcloud", - version="2.6.0", # x-releaser-pleaser-version + version="2.7.0", # x-releaser-pleaser-version keywords="hcloud hetzner cloud", description="Official Hetzner Cloud python library", long_description=readme, @@ -49,8 +49,8 @@ "coverage>=7.10,<7.11", "pylint>=3,<3.4", "pytest>=8,<8.5", - "pytest-cov>=6,<6.4", - "mypy>=1.17,<1.18", + "pytest-cov>=7,<7.1", + "mypy>=1.18,<1.19", "types-python-dateutil", "types-requests", ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/tests/unit/server_types/conftest.py new/hcloud-2.7.0/tests/unit/server_types/conftest.py --- old/hcloud-2.6.0/tests/unit/server_types/conftest.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/tests/unit/server_types/conftest.py 2025-09-26 10:03:22.000000000 +0200 @@ -33,9 +33,24 @@ "included_traffic": 21990232555520, "deprecated": True, "deprecation": { - "announced": "2023-06-01T00:00:00+00:00", - "unavailable_after": "2023-09-01T00:00:00+00:00", + "announced": "2023-06-01T00:00:00Z", + "unavailable_after": "2023-09-01T00:00:00Z", }, + "locations": [ + { + "id": 1, + "name": "nbg1", + "deprecation": None, + }, + { + "id": 2, + "name": "fsn1", + "deprecation": { + "announced": "2023-06-01T00:00:00Z", + "unavailable_after": "2023-09-01T00:00:00Z", + }, + }, + ], } } @@ -70,8 +85,8 @@ "included_traffic": 21990232555520, "deprecated": True, "deprecation": { - "announced": "2023-06-01T00:00:00+00:00", - "unavailable_after": "2023-09-01T00:00:00+00:00", + "announced": "2023-06-01T00:00:00Z", + "unavailable_after": "2023-09-01T00:00:00Z", }, }, { @@ -146,8 +161,8 @@ "included_traffic": 21990232555520, "deprecated": True, "deprecation": { - "announced": "2023-06-01T00:00:00+00:00", - "unavailable_after": "2023-09-01T00:00:00+00:00", + "announced": "2023-06-01T00:00:00Z", + "unavailable_after": "2023-09-01T00:00:00Z", }, } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hcloud-2.6.0/tests/unit/server_types/test_client.py new/hcloud-2.7.0/tests/unit/server_types/test_client.py --- old/hcloud-2.6.0/tests/unit/server_types/test_client.py 2025-09-08 12:14:09.000000000 +0200 +++ new/hcloud-2.7.0/tests/unit/server_types/test_client.py 2025-09-26 10:03:22.000000000 +0200 @@ -14,31 +14,44 @@ def bound_server_type(self, client: Client): return BoundServerType(client.server_types, data=dict(id=14)) - def test_bound_server_type_init(self, server_type_response): - bound_server_type = BoundServerType( + def test_init(self, server_type_response): + o = BoundServerType( client=mock.MagicMock(), data=server_type_response["server_type"] ) - assert bound_server_type.id == 1 - assert bound_server_type.name == "cx11" - assert bound_server_type.description == "CX11" - assert bound_server_type.category == "Shared vCPU" - assert bound_server_type.cores == 1 - assert bound_server_type.memory == 1 - assert bound_server_type.disk == 25 - assert bound_server_type.storage_type == "local" - assert bound_server_type.cpu_type == "shared" - assert bound_server_type.architecture == "x86" - assert bound_server_type.deprecated is True - assert bound_server_type.deprecation is not None - assert bound_server_type.deprecation.announced == datetime( - 2023, 6, 1, tzinfo=timezone.utc + assert o.id == 1 + assert o.name == "cx11" + assert o.description == "CX11" + assert o.category == "Shared vCPU" + assert o.cores == 1 + assert o.memory == 1 + assert o.disk == 25 + assert o.storage_type == "local" + assert o.cpu_type == "shared" + assert o.architecture == "x86" + assert len(o.locations) == 2 + assert o.locations[0].location.id == 1 + assert o.locations[0].location.name == "nbg1" + assert o.locations[0].deprecation is None + assert o.locations[1].location.id == 2 + assert o.locations[1].location.name == "fsn1" + assert ( + o.locations[1].deprecation.announced.isoformat() + == "2023-06-01T00:00:00+00:00" ) - assert bound_server_type.deprecation.unavailable_after == datetime( - 2023, 9, 1, tzinfo=timezone.utc + assert ( + o.locations[1].deprecation.unavailable_after.isoformat() + == "2023-09-01T00:00:00+00:00" ) + with pytest.deprecated_call(): - assert bound_server_type.included_traffic == 21990232555520 + assert o.deprecated is True + assert o.deprecation is not None + assert o.deprecation.announced == datetime(2023, 6, 1, tzinfo=timezone.utc) + assert o.deprecation.unavailable_after == datetime( + 2023, 9, 1, tzinfo=timezone.utc + ) + assert o.included_traffic == 21990232555520 class TestServerTypesClient:
