File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
2626 Array of reverse DNS entries
2727 :param datacenter: :class:`Datacenter <hcloud.datacenters.client.BoundDatacenter>`
2828 Datacenter the Primary IP was created in.
29+ .. deprecated:: 2.13
30+ The 'datacenter' property is deprecated and will be removed after 1 July 2026.
31+ Please use the 'location' property instead.
32+ See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
2933 :param location: :class:`Location <hcloud.locations.client.BoundLocation>`
3034 Location the Primary IP was created in.
3135 :param blocked: boolean
@@ -51,9 +55,9 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
5155 "ip" ,
5256 "type" ,
5357 "dns_ptr" ,
58+ "location" ,
5459 "blocked" ,
5560 "protection" ,
56- "location" ,
5761 "labels" ,
5862 "created" ,
5963 "name" ,
@@ -105,15 +109,12 @@ def __init__(
105109 @property
106110 def datacenter (self ) -> BoundDatacenter | None :
107111 """
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
112+ :meta private:
112113 """
113114 warnings .warn (
114115 "The 'datacenter' property is deprecated and will be removed after 1 July 2026. "
115116 "Please use the 'location' property instead. "
116- "" ,
117+ "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters. " ,
117118 DeprecationWarning ,
118119 stacklevel = 2 ,
119120 )
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ 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+ .. deprecated:: 2.13
42+ The 'datacenter' property is deprecated and will be removed after 1 July 2026.
43+ Please use the 'location' property instead.
44+ See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
4145 :param location: :class:`BoundLocation <hcloud.locations.client.BoundLocation>`
4246 :param image: :class:`BoundImage <hcloud.images.client.BoundImage>`, None
4347 :param iso: :class:`BoundIso <hcloud.isos.client.BoundIso>`, None
@@ -178,15 +182,12 @@ def private_net_for(self, network: BoundNetwork | Network) -> PrivateNet | None:
178182 @property
179183 def datacenter (self ) -> BoundDatacenter | None :
180184 """
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
185+ :meta private:
185186 """
186187 warnings .warn (
187188 "The 'datacenter' property is deprecated and will be removed after 1 July 2026. "
188189 "Please use the 'location' property instead. "
189- "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters" ,
190+ "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters. " ,
190191 DeprecationWarning ,
191192 stacklevel = 2 ,
192193 )
You can’t perform that action at this time.
0 commit comments