Sendgrid-python: Create a migration guide from v5 to v6

Created on 3 Apr 2019  路  3Comments  路  Source: sendgrid/sendgrid-python

Issue Summary

Create a guide to help folks upgrading from v5 to v6 of this library.

medium good first issue help wanted help wanted docs update up for grabs up-for-grabs

Most helpful comment

It's absurd that v6 API was released without this documentation!

There are quite a few Breaking Changes in v6, but the documentation has been practically useless.

  • The Mail helper signature has changed.
  • to_email --> is now to_emails
  • Stop using mail.Email and use mail.To, mail.From and mail.ReplyTo objects, all which entirely inherit mail.Email

    • Constructor for mail.Email changed with named parameters, so use To(email="[email protected]",

      name="Name),

  • content has changed to html_content & plain_text_content

Where

  • Setting up a SendGridAPIClient has changed.

Again no description on what changed!

Also If you were using the contents property of mail.Mail (for logging/debugging), they are no longer聽accessible via contents[x].value, they're now in contents[x].contents

Isn't Twilio/SendGrid a multi-billion dollar company??

All 3 comments

It's absurd that v6 API was released without this documentation!

There are quite a few Breaking Changes in v6, but the documentation has been practically useless.

  • The Mail helper signature has changed.
  • to_email --> is now to_emails
  • Stop using mail.Email and use mail.To, mail.From and mail.ReplyTo objects, all which entirely inherit mail.Email

    • Constructor for mail.Email changed with named parameters, so use To(email="[email protected]",

      name="Name),

  • content has changed to html_content & plain_text_content

Where

  • Setting up a SendGridAPIClient has changed.

Again no description on what changed!

Also If you were using the contents property of mail.Mail (for logging/debugging), they are no longer聽accessible via contents[x].value, they're now in contents[x].contents

Isn't Twilio/SendGrid a multi-billion dollar company??

Hello @patelnav,

Thank you for taking the time to submit your feedback.

I agree, having a more detailed description of the changes would have been ideal. However, I did not want to delay the launch.

Your comment and the votes on this issue will help push this up our backlog. Thanks!

With Best Regards,

Elmer

Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you!

Was this page helpful?
0 / 5 - 0 ratings