Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate message_with_options and send_with_options #310

Open
mehdigmira opened this issue Oct 16, 2022 · 0 comments
Open

Deprecate message_with_options and send_with_options #310

mehdigmira opened this issue Oct 16, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@mehdigmira
Copy link

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

@mehdigmira mehdigmira added the enhancement New feature or request label Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant