{"action":"created","issue":{"url":"https://api.github.com/repos/pmclanahan/django-celery-email/issues/13","labels_url":"https://api.github.com/repos/pmclanahan/django-celery-email/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/pmclanahan/django-celery-email/issues/13/comments","events_url":"https://api.github.com/repos/pmclanahan/django-celery-email/issues/13/events","html_url":"https://github.com/pmclanahan/django-celery-email/pull/13","id":62342317,"number":13,"title":"Backward compat fixes for kwargs handling in send_email task.","user":{"login":"jerith","id":43731,"avatar_url":"https://avatars.githubusercontent.com/u/43731?v=3","gravatar_id":"","url":"https://api.github.com/users/jerith","html_url":"https://github.com/jerith","followers_url":"https://api.github.com/users/jerith/followers","following_url":"https://api.github.com/users/jerith/following{/other_user}","gists_url":"https://api.github.com/users/jerith/gists{/gist_id}","starred_url":"https://api.github.com/users/jerith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerith/subscriptions","organizations_url":"https://api.github.com/users/jerith/orgs","repos_url":"https://api.github.com/users/jerith/repos","events_url":"https://api.github.com/users/jerith/events{/privacy}","received_events_url":"https://api.github.com/users/jerith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T09:26:19Z","updated_at":"2015-03-17T21:00:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pmclanahan/django-celery-email/pulls/13","html_url":"https://github.com/pmclanahan/django-celery-email/pull/13","diff_url":"https://github.com/pmclanahan/django-celery-email/pull/13.diff","patch_url":"https://github.com/pmclanahan/django-celery-email/pull/13.patch"},"body":"In version 1.1.0, `tasks.send_email()` requires the `backend_kwargs` parameter to be set explicitly. This breaks existing code using version 1.0.4 (the previous release on pypi) which uses `**kwargs` instead.\r\n\r\nI've updated `send_emails()` to accept both mechanisms, but it may be cleaner to just remove the newer `backend_kwargs` param given that the release was so recent. (This could break code that's been using unreleased versions, though.)"},"comment":{"url":"https://api.github.com/repos/pmclanahan/django-celery-email/issues/comments/82598454","html_url":"https://github.com/pmclanahan/django-celery-email/pull/13#issuecomment-82598454","issue_url":"https://api.github.com/repos/pmclanahan/django-celery-email/issues/13","id":82598454,"user":{"login":"jonashaag","id":175722,"avatar_url":"https://avatars.githubusercontent.com/u/175722?v=3","gravatar_id":"","url":"https://api.github.com/users/jonashaag","html_url":"https://github.com/jonashaag","followers_url":"https://api.github.com/users/jonashaag/followers","following_url":"https://api.github.com/users/jonashaag/following{/other_user}","gists_url":"https://api.github.com/users/jonashaag/gists{/gist_id}","starred_url":"https://api.github.com/users/jonashaag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonashaag/subscriptions","organizations_url":"https://api.github.com/users/jonashaag/orgs","repos_url":"https://api.github.com/users/jonashaag/repos","events_url":"https://api.github.com/users/jonashaag/events{/privacy}","received_events_url":"https://api.github.com/users/jonashaag/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T21:00:19Z","updated_at":"2015-03-17T21:00:19Z","body":"@jerith thanks for bringing this up. This was an oversight of mine during the refactoring.\r\n\r\nI have an alternative proposal to ensure backwards compatibility in this case: We can provide the `**kwargs` mechanism for `send_email` and `SendEmailTask` only, leaving the newer `send_emails` alone (it wasn't present in earlier versions). So:\r\n\r\n```py\r\ndef send_email(message_dict, **kwargs):\r\n    # backwards compatibility\r\n    send_emails(message_dict, backend_kwargs=kwargs)\r\n\r\nSendEmailTask = send_email\r\n```\r\n\r\nI don't think it's a good idea to use `**kwargs` as it was used in the previous version. My rationale for changing this was as follows: These arguments don't really change the behaviour of the `send_emails` function. Rather, they are passed to the backend untouched. I'd expect direct arguments to change the behaviour of the function I'm calling, so I'd be confused by that."}}