Azure / Azure/azure-sdk-for-python

[Core] Generic sleep function

Open
#39,469 1 comment 0 reactions 1 assignee Claimed by @l0lawrence View on GitHub
Azure.Core Core.Http feature-request
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

For places where we `asyncio.sleep` within [core](https://github.com/Azure/azure-sdk-for-python/blob/db3b0e483968103a5142b5cc3a13f447b06bd582/sdk/core/corehttp/corehttp/transport/_base_async.py#L98), and in other SDK packages such as [azure-cosmos](https://github.com/Azure/azure-sdk-for-python/blob/db3b0e483968103a5142b5cc3a13f447b06bd582/sdk/cosmos/azure-cosmos/azure/cosmos/aio/_retry_utility_async.py#L193) or [azure-communication-identity](https://github.com/Azure/azure-sdk-for-python/blob/db3b0e483968103a5142b5cc3a13f447b06bd582/sdk/communication/azure-communication-identity/azure/communication/identity/_shared/utils_async.py#L25) we should replace this with a generic sleep function that works with both asyncio and trio/other transports.

This will prevent us from having to import asyncio outside of core except in special cases.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.