1313from http .cookiejar import CookieJar
1414from types import TracebackType
1515from typing import Any
16- from typing import AnyStr
1716from typing import Callable
1817from typing import Optional
1918from typing import TYPE_CHECKING
@@ -182,9 +181,9 @@ async def __aexit__(
182181 self , exc_type : type , exc_value : BaseException , tb : TracebackType
183182 ) -> None : ...
184183
185- async def receive (self ) -> AnyStr : ...
184+ async def receive (self ) -> str | bytes : ...
186185
187- async def send (self , data : AnyStr ) -> None : ...
186+ async def send (self , data : str | bytes ) -> None : ...
188187
189188 async def receive_json (self ) -> Any : ...
190189
@@ -210,7 +209,7 @@ async def open(
210209 * ,
211210 method : str = "GET" ,
212211 headers : dict | Headers | None = None ,
213- data : AnyStr | None = None ,
212+ data : str | bytes | None = None ,
214213 form : dict | None = None ,
215214 files : dict [str , FileStorage ] | None = None ,
216215 query_string : dict | None = None ,
@@ -297,7 +296,7 @@ def session_transaction(
297296 headers : dict | Headers | None = None ,
298297 query_string : dict | None = None ,
299298 scheme : str = "http" ,
300- data : AnyStr | None = None ,
299+ data : str | bytes | None = None ,
301300 form : dict | None = None ,
302301 json : Any = None ,
303302 root_path : str = "" ,
0 commit comments