"examples/vscode:/vscode.git/clone" did not exist on "8b664706aa72315e436097d19257536228e01792"
Unverified Commit 0f0926b4 authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

[Deprecation] Remove unused sync methods in `async_timeout` (#18792)


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent 7f2c1a87
......@@ -8,7 +8,6 @@
import asyncio
import enum
import sys
import warnings
from types import TracebackType
from typing import Any, Optional, Type
......@@ -66,24 +65,6 @@ else:
else:
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":
self._do_enter()
return self
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment