Skip to content

Deprecate message_with_options and send_with_options #310

Description

@mehdigmira

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions