Type annotating Context.open_stream()
(probably with msgspec.Struct
subtype(s)) 😎
#365
Labels
api
enhancement
New feature or request
IPC and transport
messaging
messaging patterns and protocols
streaming
After having seen this style in
anyio
's latest release:https://github.com/agronholm/anyio/pull/599/files#diff-1fb03ea452beca16c76e364dc7f8ffe3dfcbb20be7e732cc5a552cba32fd771aR104
which it turns out,
trio
also already supports this 💥 (well viatrio_typing
),https://github.com/python-trio/trio/blob/348713a7ae73c1afaef79969c90c57e12f4f098b/trio/_channel.py#L93
ANNDDD apparently since it's being proposed more generally for
typing functions!
https://peps.python.org/pep-0718/
I think doing the same (at least) for our
MsgStream
s would be super nice(and) as it pertains to eventual plans for static msg typing in #36 and #196
🏄!
proto API
typed msging API would probably be something like:
The text was updated successfully, but these errors were encountered: