fix: start to reconcile internal inconsistencies wrt multiple from values #7935
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.