Skip to content

fix: start to reconcile internal inconsistencies wrt multiple from values#7935

Merged
rjsparks merged 1 commit intoietf-tools:mainfrom
rjsparks:therecanbeonlyone
Sep 16, 2024
Merged

fix: start to reconcile internal inconsistencies wrt multiple from values#7935
rjsparks merged 1 commit intoietf-tools:mainfrom
rjsparks:therecanbeonlyone

Conversation

@rjsparks
Copy link
Member

Changes to parseaddr between 3.9.19 and 3.9.20 uncovered errors that have existed in our mail sending code since it was first written, and highlighted that the ietf.utils.mail module is inconsistent in its design for messages with multiple From header values.

This is a stopgap PR to preserve behavior to the extent possible as we upgrade python. More work will be needed to address the inconsistent ideas around multiple from header values.

We have not sent a message from the datatracker with multiple from header values in nearly 15 years, so for the moment, we're warning (in a way that intentionally raises test failures), but otherwise keeping the existing behavior if new attempts to use multiple values occur.

The older test that appeared to be testing multiple values was only passing as a coincidence of bugs in the code. It has been restricted to a single value until the module can be reworked.

Copy link
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

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

lgtm. Could add a test that the assertions fire as expected, but I'm not convinced it's worth the trouble.

@rjsparks rjsparks merged commit 3b5058a into ietf-tools:main Sep 16, 2024
@rjsparks rjsparks deleted the therecanbeonlyone branch September 16, 2024 13:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants