diff options
| author | Rapptz <[email protected]> | 2021-04-04 23:55:15 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-04 23:55:15 -0400 |
| commit | 93a92e6e1bba4755347badbd7fbda84f45ad9f74 (patch) | |
| tree | 9a3cf689fee6fc34d2d40095e92a01d9ded280c9 | |
| parent | Convert datetimes to aware datetimes with UTC. (diff) | |
| download | discord.py-93a92e6e1bba4755347badbd7fbda84f45ad9f74.tar.xz discord.py-93a92e6e1bba4755347badbd7fbda84f45ad9f74.zip | |
Remove special casing of MAX_ASYNCIO_SECONDS in sleep_until
This compatibility code goes away in Python versions greater than 3.7
| -rw-r--r-- | discord/utils.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/discord/utils.py b/discord/utils.py index 3a8002c1..14470648 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -40,7 +40,6 @@ import warnings from .errors import InvalidArgument DISCORD_EPOCH = 1420070400000 -MAX_ASYNCIO_SECONDS = 3456000 class cached_property: def __init__(self, function): @@ -400,9 +399,6 @@ async def sleep_until(when, result=None): when = when.astimezone() now = datetime.datetime.now(datetime.timezone.utc) delta = (when - now).total_seconds() - while delta > MAX_ASYNCIO_SECONDS: - await asyncio.sleep(MAX_ASYNCIO_SECONDS) - delta -= MAX_ASYNCIO_SECONDS return await asyncio.sleep(max(delta, 0), result) def valid_icon_size(size): |