Skip to content

gh-159350: Handle empty lists in strict email.utils.parseaddr - #159351

Draft
esadomer wants to merge 1 commit into
python:mainfrom
esadomer:fix-20261013-15-parseaddr-empty-list
Draft

esadomer wants to merge 1 commit into
python:mainfrom
esadomer:fix-20261013-15-parseaddr-empty-list

Conversation

@esadomer

@esadomer esadomer commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Strict parseaddr() indexes list input before checking whether it is empty, raising IndexError. Return the empty address pair for an empty list and cover both strictness modes.

Fixes #159350.

Validation (Windows debug build): test_email passed (1,820 tests run, 7 skipped); the strict empty-list case failed before the fix. The isolated patch applies cleanly to the base revision.

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.

Handle empty lists in strict email.utils.parseaddr

1 participant