Skip to content

Commit dea724d

Browse files
Adds a deprecation warning for the wait() method (#682)
* Adds a deprecation warning for the wait() method Signed-off-by: Elena Kolevska <[email protected]> * Ruff Signed-off-by: Elena Kolevska <[email protected]> --------- Signed-off-by: Elena Kolevska <[email protected]>
1 parent 0b7aafd commit dea724d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dapr/aio/clients/grpc/client.py

+6
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,12 @@ async def wait(self, timeout_s: float):
15351535
Args:
15361536
timeout_s (float): timeout in seconds
15371537
"""
1538+
warn(
1539+
'The wait method is deprecated. A health check is now done automatically on client '
1540+
'initialization.',
1541+
DeprecationWarning,
1542+
stacklevel=2,
1543+
)
15381544

15391545
start = time.time()
15401546
while True:

dapr/clients/grpc/client.py

+6
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,12 @@ def wait(self, timeout_s: float):
15181518
Args:
15191519
timeout_s (float): timeout in seconds
15201520
"""
1521+
warn(
1522+
'The wait method is deprecated. A health check is now done automatically on client '
1523+
'initialization.',
1524+
DeprecationWarning,
1525+
stacklevel=2,
1526+
)
15211527
start = time.time()
15221528
while True:
15231529
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:

0 commit comments

Comments
 (0)