Motivation
message_with_options and send_with_options cannot be type checked by python static type checkers today. Type checking is starting to become a major topic in the Python realm, so it is important this is addressed
Proposal
- Deprecate
message_with_options and send_with_options
- Add 2 new method to
Message
class Message(Generic[T]):
...
def with_options(self) -> Message[T]:
...
def send(self) -> None:
...
So actor.send_with_options(args=[1, 2], kwargs={"foo": 3}, max_retries=5) becomes actor.message(1, 2, foo=3).with_options(max_retries=5).send()
Motivation
message_with_optionsandsend_with_optionscannot be type checked by python static type checkers today. Type checking is starting to become a major topic in the Python realm, so it is important this is addressedProposal
message_with_optionsandsend_with_optionsMessageSo
actor.send_with_options(args=[1, 2], kwargs={"foo": 3}, max_retries=5)becomesactor.message(1, 2, foo=3).with_options(max_retries=5).send()