mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-13 15:25:01 +08:00
[Deprecation] Remove unused sync methods in async_timeout (#18792)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
parent
7f2c1a87e9
commit
0f0926b43f
@ -8,7 +8,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import enum
|
import enum
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
|
||||||
from types import TracebackType
|
from types import TracebackType
|
||||||
from typing import Any, Optional, Type
|
from typing import Any, Optional, Type
|
||||||
|
|
||||||
@ -66,24 +65,6 @@ else:
|
|||||||
else:
|
else:
|
||||||
self.update(deadline)
|
self.update(deadline)
|
||||||
|
|
||||||
def __enter__(self) -> "Timeout":
|
|
||||||
warnings.warn(
|
|
||||||
"with timeout() is deprecated, use async with timeout()",
|
|
||||||
DeprecationWarning,
|
|
||||||
stacklevel=2,
|
|
||||||
)
|
|
||||||
self._do_enter()
|
|
||||||
return self
|
|
||||||
|
|
||||||
def __exit__(
|
|
||||||
self,
|
|
||||||
exc_type: Optional[Type[BaseException]],
|
|
||||||
exc_val: Optional[BaseException],
|
|
||||||
exc_tb: Optional[TracebackType],
|
|
||||||
) -> Optional[bool]:
|
|
||||||
self._do_exit(exc_type)
|
|
||||||
return None
|
|
||||||
|
|
||||||
async def __aenter__(self) -> "Timeout":
|
async def __aenter__(self) -> "Timeout":
|
||||||
self._do_enter()
|
self._do_enter()
|
||||||
return self
|
return self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user