Skip to content

Remove option for non-callable keys argument to incr_and_sum #741

Description

@LincolnPuzey

The keys argument to incr_and_sum is always a callable when used internally by dramatiq.

keys(callable): A callable to return the list of keys to be
summed over.

For backwards-compatibility it was still accepting a list in the implementations.

# TODO: Drop non-callable keys in Dramatiq v2.
key_list = keys() if callable(keys) else keys

# TODO: Drop non-callable keys in Dramatiq v2.
key_list = keys() if callable(keys) else keys

# TODO: Drop non-callable keys in Dramatiq v2.
key_list = keys() if callable(keys) else keys

We should remove this option. Technically a breaking change, but I suspect not many users would be calling this method directly themselves

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    beginner friendlyEnhancements or issues that are easy for someone to get started on.enhancement

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions