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 2026-05-04 12:54:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hcloud (Old)
 and      /work/SRC/openSUSE:Factory/.python-hcloud.new.30200 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-hcloud"

Mon May  4 12:54:43 2026 rev:19 rq:1350582 version:2.19.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hcloud/python-hcloud.changes      
2026-04-25 21:43:03.135709369 +0200
+++ /work/SRC/openSUSE:Factory/.python-hcloud.new.30200/python-hcloud.changes   
2026-05-04 12:58:21.837448425 +0200
@@ -1,0 +2,22 @@
+Sun May  3 20:33:00 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 2.19.0:
+  * In the create Primary IP call, the `assignee_type` argument
+    is now only send when the `assignee_id` argument is set. The
+    `assignee_type` argument will stop defaulting to `server` in
+    the near future, consider explicitly setting this argument
+    when needed.
+  * As of 1 August 2026, the behavior of the Primary IP
+    `assignee_type` property will change, and will return
+    `unassigned` when the Primary IP is not assigned (when
+    `assignee_id` is `null`). The goal is to eventually assign
+    Primary IPs to other resource types, not only to `server`.
+  * In addition, the Primary IP request body `assignee_type`
+    property of the operation `POST /v1/primary_ips` is now
+    optional. Primary IPs created without `assignee_type` return
+    `server` until 1 August 2026, after this date, its value will
+    be `unassigned`.
+  * **primary-ip**: `assignee_type` behavior changed when
+    creating a primary ip
+
+-------------------------------------------------------------------

Old:
----
  hcloud-2.18.0.tar.gz

New:
----
  hcloud-2.19.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-hcloud.spec ++++++
--- /var/tmp/diff_new_pack.PZepmc/_old  2026-05-04 12:58:22.349469497 +0200
+++ /var/tmp/diff_new_pack.PZepmc/_new  2026-05-04 12:58:22.353469662 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-hcloud
-Version:        2.18.0
+Version:        2.19.0
 Release:        0
 Summary:        Hetzner Cloud Python library
 License:        MIT

++++++ hcloud-2.18.0.tar.gz -> hcloud-2.19.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/CHANGELOG.md 
new/hcloud-2.19.0/CHANGELOG.md
--- old/hcloud-2.18.0/CHANGELOG.md      2026-04-23 12:03:05.000000000 +0200
+++ new/hcloud-2.19.0/CHANGELOG.md      2026-04-28 14:01:22.000000000 +0200
@@ -1,5 +1,23 @@
 # Changelog
 
+## 
[v2.19.0](https://github.com/hetznercloud/hcloud-python/releases/tag/v2.19.0)
+
+### Primary IPs `assignee_type` behavior change
+
+In the create Primary IP call, the `assignee_type` argument is now only send 
when the `assignee_id` argument is set. The `assignee_type` argument will stop 
defaulting to `server` in the near future, consider explicitly setting this 
argument when needed.
+
+As of 1 August 2026, the behavior of the Primary IP `assignee_type` property 
will change, and will return `unassigned` when the Primary IP is not assigned 
(when `assignee_id` is `null`). The goal is to eventually assign Primary IPs to 
other resource types, not only to `server`.
+
+See the 
[changelog](https://docs.hetzner.cloud/changelog#2026-04-27-primary-ips-will-return-unassigned)
 for more details.
+
+In addition, the Primary IP request body `assignee_type` property of the 
operation [`POST 
/v1/primary_ips`](https://docs.hetzner.cloud/reference/cloud#tag/primary-ips/create_primary_ip)
 is now optional. Primary IPs created without `assignee_type` return `server` 
until 1 August 2026, after this date, its value will be `unassigned`.
+
+See the 
[changelog](https://docs.hetzner.cloud/changelog#2026-04-27-primary-ips-make-assignee_type-optional)
 for more details.
+
+### Features
+
+- **primary-ip**: `assignee_type` behavior changed when creating a primary ip 
(#647)
+
 ## 
[v2.18.0](https://github.com/hetznercloud/hcloud-python/releases/tag/v2.18.0)
 
 ### Available and recommended Server Types have been moved
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/PKG-INFO new/hcloud-2.19.0/PKG-INFO
--- old/hcloud-2.18.0/PKG-INFO  2026-04-23 12:03:14.926858000 +0200
+++ new/hcloud-2.19.0/PKG-INFO  2026-04-28 14:01:40.619326800 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: hcloud
-Version: 2.18.0
+Version: 2.19.0
 Summary: Official Hetzner Cloud python library
 Home-page: https://github.com/hetznercloud/hcloud-python
 Author: Hetzner Cloud GmbH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/hcloud/_version.py 
new/hcloud-2.19.0/hcloud/_version.py
--- old/hcloud-2.18.0/hcloud/_version.py        2026-04-23 12:03:05.000000000 
+0200
+++ new/hcloud-2.19.0/hcloud/_version.py        2026-04-28 14:01:22.000000000 
+0200
@@ -1,3 +1,3 @@
 from __future__ import annotations
 
-__version__ = "2.18.0"  # x-releaser-pleaser-version
+__version__ = "2.19.0"  # x-releaser-pleaser-version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/hcloud/primary_ips/client.py 
new/hcloud-2.19.0/hcloud/primary_ips/client.py
--- old/hcloud-2.18.0/hcloud/primary_ips/client.py      2026-04-23 
12:03:05.000000000 +0200
+++ new/hcloud-2.19.0/hcloud/primary_ips/client.py      2026-04-28 
14:01:22.000000000 +0200
@@ -311,7 +311,7 @@
         name: str,
         datacenter: Datacenter | BoundDatacenter | None = None,
         location: Location | BoundLocation | None = None,
-        assignee_type: str | None = "server",
+        assignee_type: str | None = None,
         assignee_id: int | None = None,
         auto_delete: bool | None = False,
         labels: dict[str, str] | None = None,
@@ -328,13 +328,12 @@
         :param labels: Dict[str, str] (optional) User-defined labels 
(key-value pairs)
         :return: :class:`CreatePrimaryIPResponse 
<hcloud.primary_ips.domain.CreatePrimaryIPResponse>`
         """
-
         data: dict[str, Any] = {
             "name": name,
             "type": type,
-            "assignee_type": assignee_type,
             "auto_delete": auto_delete,
         }
+
         if datacenter is not None:
             warnings.warn(
                 "The 'datacenter' argument is deprecated and will be removed 
after 1 July 2026. "
@@ -348,10 +347,24 @@
             data["location"] = location.id_or_name
         if assignee_id is not None:
             data["assignee_id"] = assignee_id
+            if assignee_type is None:
+                assignee_type = "server"
+                warnings.warn(
+                    "The 'assignee_type' argument will no longer default to 
'server' "
+                    "and will be required together with the 'assignee_id' 
argument. "
+                    "Please explicitly set the 'assignee_type' argument.",
+                    DeprecationWarning,
+                    stacklevel=2,
+                )
+            data["assignee_type"] = assignee_type
         if labels is not None:
             data["labels"] = labels
 
-        response = self._client.request(url=self._base_url, json=data, 
method="POST")
+        response = self._client.request(
+            method="POST",
+            url=self._base_url,
+            json=data,
+        )
 
         action = None
         if response.get("action") is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/hcloud.egg-info/PKG-INFO 
new/hcloud-2.19.0/hcloud.egg-info/PKG-INFO
--- old/hcloud-2.18.0/hcloud.egg-info/PKG-INFO  2026-04-23 12:03:14.000000000 
+0200
+++ new/hcloud-2.19.0/hcloud.egg-info/PKG-INFO  2026-04-28 14:01:40.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: hcloud
-Version: 2.18.0
+Version: 2.19.0
 Summary: Official Hetzner Cloud python library
 Home-page: https://github.com/hetznercloud/hcloud-python
 Author: Hetzner Cloud GmbH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/setup.py new/hcloud-2.19.0/setup.py
--- old/hcloud-2.18.0/setup.py  2026-04-23 12:03:05.000000000 +0200
+++ new/hcloud-2.19.0/setup.py  2026-04-28 14:01:22.000000000 +0200
@@ -7,7 +7,7 @@
 
 setup(
     name="hcloud",
-    version="2.18.0",  # x-releaser-pleaser-version
+    version="2.19.0",  # x-releaser-pleaser-version
     keywords="hcloud hetzner cloud",
     description="Official Hetzner Cloud python library",
     long_description=readme,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hcloud-2.18.0/tests/unit/primary_ips/test_client.py 
new/hcloud-2.19.0/tests/unit/primary_ips/test_client.py
--- old/hcloud-2.18.0/tests/unit/primary_ips/test_client.py     2026-04-23 
12:03:05.000000000 +0200
+++ new/hcloud-2.19.0/tests/unit/primary_ips/test_client.py     2026-04-28 
14:01:22.000000000 +0200
@@ -162,7 +162,6 @@
             json={
                 "name": "primary-ip1",
                 "type": "ipv4",
-                "assignee_type": "server",
                 "location": "fsn1",
                 "auto_delete": False,
             },
@@ -194,7 +193,6 @@
             json={
                 "name": "primary-ip1",
                 "type": "ipv4",
-                "assignee_type": "server",
                 "datacenter": "fsn1-dc14",
                 "auto_delete": False,
             },
@@ -236,6 +234,37 @@
         assert_bound_primary_ip1(result.primary_ip, resource_client)
         assert_bound_action1(result.action, resource_client._parent.actions)
 
+    def test_create_with_assignee_type_deprecation(
+        self,
+        request_mock: mock.MagicMock,
+        resource_client: PrimaryIPsClient,
+        primary_ip1,
+        action1_running,
+    ):
+        request_mock.return_value = {
+            "primary_ip": primary_ip1,
+            "action": action1_running,
+        }
+
+        with pytest.deprecated_call():
+            resource_client.create(
+                type="ipv4",
+                name="primary-ip1",
+                assignee_id=17,
+            )
+
+        request_mock.assert_called_with(
+            method="POST",
+            url="/primary_ips",
+            json={
+                "name": "primary-ip1",
+                "type": "ipv4",
+                "assignee_id": 17,
+                "assignee_type": "server",
+                "auto_delete": False,
+            },
+        )
+
     @pytest.mark.parametrize(
         "primary_ip",
         [

Reply via email to