Skip to content

Commit 9b4d19d

Browse files
feat(client): remove __aenter__ and __aexit__ from BaseClient
1 parent e29ec70 commit 9b4d19d

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

src/a2a/client/base_client.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from collections.abc import AsyncGenerator, AsyncIterator, Callable
2-
from types import TracebackType
32
from typing import Any
43

5-
from typing_extensions import Self
6-
74
from a2a.client.client import (
85
Client,
96
ClientCallContext,
@@ -48,19 +45,6 @@ def __init__(
4845
self._config = config
4946
self._transport = transport
5047

51-
async def __aenter__(self) -> Self:
52-
"""Enters the async context manager, returning the client itself."""
53-
return self
54-
55-
async def __aexit__(
56-
self,
57-
exc_type: type[BaseException] | None,
58-
exc_val: BaseException | None,
59-
exc_tb: TracebackType | None,
60-
) -> None:
61-
"""Exits the async context manager, ensuring close() is called."""
62-
await self.close()
63-
6448
async def send_message(
6549
self,
6650
request: Message,

0 commit comments

Comments
 (0)