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

feat: geolocation setter in sendgrid-python for GDPR compliance #1073

Merged
merged 22 commits into from
Nov 23, 2023

Conversation

manisha1997
Copy link
Contributor

@manisha1997 manisha1997 commented Nov 14, 2023

feat!: Geolocation setter for GDPR compliance

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket.

test/unit/test_sendgrid.py Outdated Show resolved Hide resolved
test/unit/test_sendgrid.py Show resolved Hide resolved
sendgrid/base_interface.py Outdated Show resolved Hide resolved
sendgrid/sendgrid.py Outdated Show resolved Hide resolved
Copy link

@shrutiburman shrutiburman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manisha1997
Copy link
Contributor Author

@tbischel, What will be the precedence of the host and data_residency.
In case, the user uses both set_host and set_data_residency, we are setting host based on the latest input.

def test_host_with_host_first_eu_region_second(self):
,
def test_host_with_eu_first_host_second(self):

Can you please clarify if this is correct precedence?

Copy link

@gladysmae08 gladysmae08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR

sendgrid/base_interface.py Outdated Show resolved Hide resolved
sendgrid/base_interface.py Outdated Show resolved Hide resolved
sendgrid/base_interface.py Outdated Show resolved Hide resolved
sendgrid/base_interface.py Outdated Show resolved Hide resolved
@tbischel
Copy link

regarding precedence:
I think if they explicitly call the setters, it makes sense to respect the latest called. I think if they pass region and host in the constructor at the same time, we should throw an error if they conflict.

@manisha1997
Copy link
Contributor Author

Makes sense Tyler, thanks.
Will introduce the changes accordingly.

@manisha1997
Copy link
Contributor Author

@tbischel, we decided to remove region and only have a data residency setter.
We removed the set_host as we don't want to expose the function right now #1073 (comment).
Can you please review the changes

@tbischel
Copy link

minor nit with the print placement, but other than that LGTM

@tiwarishubham635
Copy link

LGTM!

Copy link

@tbischel tbischel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shrutiburman shrutiburman merged commit b5afcca into main Nov 23, 2023
22 checks passed
@shrutiburman shrutiburman deleted the 7.0.0-rc branch November 23, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants