Skip to content

Commit

Permalink
Deprecated loop argument to timeout().
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Aug 8, 2022
1 parent f384704 commit 100ac35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions asgiref/timeout.py
Expand Up @@ -7,6 +7,7 @@


import asyncio
import warnings
from types import TracebackType
from typing import Any, Optional, Type

Expand Down Expand Up @@ -35,6 +36,10 @@ def __init__(
self._timeout = timeout
if loop is None:
loop = asyncio.get_running_loop()
else:
warnings.warn(
"""The loop argument to timeout() is deprecated.""", DeprecationWarning
)
self._loop = loop
self._task = None # type: Optional[asyncio.Task[Any]]
self._cancelled = False
Expand Down

0 comments on commit 100ac35

Please sign in to comment.