10000 bpo-27513: email.utils.getaddresses() now handles Header objects by ZackerySpytz · Pull Request #13797 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-27513: email.utils.getaddresses() now handles Header objects #13797

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

Merged
merged 2 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Respond to review
  • Loading branch information
ambv committed Jul 19, 2021
commit 1c792769242e379e656a2a81bc4f1fad02096cdc
3 changes: 1 addition & 2 deletions Lib/test/test_email/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -3265,9 +3265,8 @@ def test_getaddresses_embedded_comment(self):

def test_getaddresses_header_obj(self):
"""Test the handling of a Header object."""
eq = self.assertEqual
addrs = utils.getaddresses([Header('Al Person <aperson@dom.ain>')])
eq(addrs[0][1], 'aperson@dom.ain')
self.assertEqual(addrs[0][1], 'aperson@dom.ain')

def test_make_msgid_collisions(self):
# Test make_msgid uniqueness, even with multiple threads
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
:func:`email.charset.getaddresses` can now handle
:class:`~email.header.Header` objects.
:func:`email.utils.getaddresses` now accepts
:class:`email.header.Header` objects along with string values.
Patch by Zackery Spytz.
0