-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
bpo-32814: Handle 8BITMIME availabilty in smtplib.SMTP.send_message #8303
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
base: main
Are you sure you want to change the base?
Changes from all commits
f1d84c0
404227f
d5aa73c
36b4b1c
ab2ecad
5d7bc8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1083,7 +1083,7 @@ def test_basic(self): | |
| self.assertEqual(mailfrom, 'me') | ||
| self.assertEqual(rcpttos, ['you']) | ||
| self.assertIn('\nSubject: Log\n', data) | ||
| self.assertTrue(data.endswith('\n\nHello \u2713')) | ||
| self.assertTrue(data.endswith('\n\nSGVsbG8g4pyTCg==')) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is problematic. I'm guessing the test server needs to be told to support utf8 so the test itself doesn't change, but I haven't looked at the code. Regardless, we'd need to get Vinay Sajep to sign off on any changes here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this like this because the SMTP server used in this tests uses
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, OK, then not using decode_data=True would be the right fix. decode_data=True is deprecated. |
||
| h.close() | ||
|
|
||
| def process_message(self, *args): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Handle ``8BITMIME`` (RFC6152) availability automatically in | ||
| ``smtplib.SMTP.send_message``. Patch by Segev Finer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a bug fix, not a new feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda both, hard to decide... 😛
I documented this like this since it's a breaking change. Do you think it should be documented differently? If so, then how?