Skip to content

helpers.Mail: warn on incorrect invocation - #559

Closed
mdornseif wants to merge 1 commit into
sendgrid:masterfrom
mdornseif:patch-1
Closed

helpers.Mail: warn on incorrect invocation#559
mdornseif wants to merge 1 commit into
sendgrid:masterfrom
mdornseif:patch-1

Conversation

@mdornseif

@mdornseif mdornseif commented Feb 26, 2018

Copy link
Copy Markdown

Invocations like Mail(from_email=Email('express@example.com'), subject=subject, to_email=Email(to)) silently discard all parameters. Took me several hours to debug this. I'm not sure why the library is designed that way. But I thought it would be nice to warn the caller if parameters are discarded.

Fixes

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

If you have questions, please send an email to Sendgrid, or file a Github Issue in this repository.

Invocations like `Mail(from_email=Email('express@example.com'), subject=subject, to_email=Email(to))` silently discard all parameters. Took me several hours to debug this. I'm not sure why the library is designed that way. But I thought it would be nice to warn the caller if parameters are discarded.
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Feb 26, 2018
@SendGridDX

SendGridDX commented Feb 26, 2018

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@thinkingserious

Copy link
Copy Markdown
Contributor

Thank you @mdornseif!

I have added this to our backlog for a code review.

With Best Regards,

Elmer

@thinkingserious thinkingserious added type: community enhancement feature request not on Twilio's roadmap difficulty: medium fix is medium in difficulty labels Feb 27, 2018
@0bsearch

Copy link
Copy Markdown
Contributor

This will be obsolete after merging #554

@thinkingserious

Copy link
Copy Markdown
Contributor

That is true @3lnc, thanks for the heads up.

We still appreciate your contribution @mdornseif and would like to offer you some swag.

With Best Regards,

Elmer

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

Labels

difficulty: medium fix is medium in difficulty status: code review request requesting a community code review or review from Twilio type: community enhancement feature request not on Twilio's roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants