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 @@ -27,6 +27,10 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
2727 Array of reverse DNS entries
2828 :param datacenter: :class:`Datacenter <hcloud.datacenters.client.BoundDatacenter>`
2929 Datacenter the Primary IP was created in.
30+ .. deprecated:: 2.13
31+ The 'datacenter' property is deprecated and will be removed after 1 July 2026.
32+ Please use the 'location' property instead.
33+ See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
3034 :param location: :class:`Location <hcloud.locations.client.BoundLocation>`
3135 Location the Primary IP was created in.
3236 :param blocked: boolean
@@ -52,9 +56,9 @@ class PrimaryIP(BaseDomain, DomainIdentityMixin):
5256 "ip" ,
5357 "type" ,
5458 "dns_ptr" ,
59+ "location" ,
5560 "blocked" ,
5661 "protection" ,
57- "location" ,
5862 "labels" ,
5963 "created" ,
6064 "name" ,
@@ -106,15 +110,12 @@ def __init__(
106110 @property
107111 def datacenter (self ) -> BoundDatacenter | None :
108112 """
109- Datacenter the Primary IP was created in.
110-
111- .. deprecated:: 2.13
112- See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
113+ :meta private:
113114 """
114115 warnings .warn (
115116 "The 'datacenter' property is deprecated and will be removed after 1 July 2026. "
116117 "Please use the 'location' property instead. "
117- "" ,
118+ "See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters. " ,
118119 DeprecationWarning ,
119120 stacklevel = 2 ,
120121 )
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ class Server(BaseDomain, DomainIdentityMixin):
3939 Public network information.
4040 :param server_type: :class:`BoundServerType <hcloud.server_types.client.BoundServerType>`
4141 :param datacenter: :class:`BoundDatacenter <hcloud.datacenters.client.BoundDatacenter>`
42+ .. deprecated:: 2.13
43+ The 'datacenter' property is deprecated and will be removed after 1 July 2026.
44+ Please use the 'location' property instead.
45+ See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
4246 :param location: :class:`BoundLocation <hcloud.locations.client.BoundLocation>`
4347 :param image: :class:`BoundImage <hcloud.images.client.BoundImage>`, None
4448 :param iso: :class:`BoundIso <hcloud.isos.client.BoundIso>`, None
@@ -179,15 +183,12 @@ def private_net_for(self, network: BoundNetwork | Network) -> PrivateNet | None:
179183 @property
180184 def datacenter (self ) -> BoundDatacenter | None :
181185 """
182- Datacenter the Server was created in.
183-
184- .. deprecated:: 2.13
185- See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
186+ :meta private:
186187 """
187188 warnings .warn (
188189 "The 'datacenter' property is deprecated and will be removed after 1 July 2026. "
189190 "Please use the 'location' property instead. "
190- "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. " ,
191192 DeprecationWarning ,
192193 stacklevel = 2 ,
193194 )
You can’t perform that action at this time.
0 commit comments