File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3- from .client import BoundModelBase , ClientEntityBase
3+ from .client import BaseResourceClient , BoundModelBase , ClientEntityBase
44from .domain import BaseDomain , DomainIdentityMixin , Meta , Pagination
55
66__all__ = [
77 "BoundModelBase" ,
8+ "BaseResourceClient" ,
89 "ClientEntityBase" ,
910 "BaseDomain" ,
1011 "DomainIdentityMixin" ,
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import warnings
34from typing import TYPE_CHECKING , Any , Callable
45
56if TYPE_CHECKING :
67 from .._client import Client
78
89
9- class ClientEntityBase :
10+ class BaseResourceClient :
1011 _client : Client
1112
1213 max_per_page : int = 50
@@ -50,6 +51,24 @@ def _get_first_by(self, **kwargs): # type: ignore[no-untyped-def]
5051 return entities [0 ] if entities else None
5152
5253
54+ class ClientEntityBase (BaseResourceClient ):
55+ """
56+ Kept for backward compatibility.
57+
58+ .. deprecated:: 2.6.0
59+ Use :class:``hcloud.core.client.BaseResourceClient`` instead.
60+ """
61+
62+ def __init__ (self , client : Client ):
63+ warnings .warn (
64+ "The 'hcloud.core.client.BaseResourceClient' class is deprecated, please use the "
65+ "'hcloud.core.client.BaseResourceClient' class instead." ,
66+ DeprecationWarning ,
67+ stacklevel = 2 ,
68+ )
69+ super ().__init__ (client )
70+
71+
5372class BoundModelBase :
5473 """Bound Model Base"""
5574
You can’t perform that action at this time.
0 commit comments