File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed
Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
2525 :param dns_ptr: List[Dict]
2626 Array of reverse DNS entries
2727 :param datacenter: :class:`Datacenter <hcloud.datacenters.client.BoundDatacenter>`
28- Datacenter the Primary IP was created in.
28+ Datacenter the Primary IP was created in.
29+
30+ This property is deprecated and will be removed after 1 July 2026.
31+ Please use the ``location`` property instead.
32+
33+ See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
34+
2935 :param location: :class:`Location <hcloud.locations.client.BoundLocation>`
3036 Location the Primary IP was created in.
3137 :param blocked: boolean
@@ -51,9 +57,9 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
5157 "ip" ,
5258 "type" ,
5359 "dns_ptr" ,
60+ "location" ,
5461 "blocked" ,
5562 "protection" ,
56- "location" ,
5763 "labels" ,
5864 "created" ,
5965 "name" ,
@@ -105,15 +111,12 @@ def __init__(
105111 @property
106112 def datacenter (self ) -> BoundDatacenter | None :
107113 """
108- Datacenter the Primary IP was created in.
109-
110- .. deprecated:: 2.13
111- See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
114+ :meta private:
112115 """
113116 warnings .warn (
114117 "The 'datacenter' property is deprecated and will be removed after 1 July 2026. "
115118 "Please use the 'location' property instead. "
116- "" ,
119+ "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters. " ,
117120 DeprecationWarning ,
118121 stacklevel = 2 ,
119122 )
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ class Server(BaseDomain, DomainIdentityMixin):
3838 Public network information.
3939 :param server_type: :class:`BoundServerType <hcloud.server_types.client.BoundServerType>`
4040 :param datacenter: :class:`BoundDatacenter <hcloud.datacenters.client.BoundDatacenter>`
41+
42+ This property is deprecated and will be removed after 1 July 2026.
43+ Please use the ``location`` property instead.
44+
45+ See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
4146 :param location: :class:`BoundLocation <hcloud.locations.client.BoundLocation>`
4247 :param image: :class:`BoundImage <hcloud.images.client.BoundImage>`, None
4348 :param iso: :class:`BoundIso <hcloud.isos.client.BoundIso>`, None
@@ -178,15 +183,12 @@ def private_net_for(self, network: BoundNetwork | Network) -> PrivateNet | None:
178183 @property
179184 def datacenter (self ) -> BoundDatacenter | None :
180185 """
181- Datacenter the Server was created in.
182-
183- .. deprecated:: 2.13
184- See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
186+ :meta private:
185187 """
186188 warnings .warn (
187189 "The 'datacenter' property is deprecated and will be removed after 1 July 2026. "
188190 "Please use the 'location' property instead. "
189- "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters" ,
191+ "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters. " ,
190192 DeprecationWarning ,
191193 stacklevel = 2 ,
192194 )
You can’t perform that action at this time.
0 commit comments