fix: start to reconcile internal inconsistencies wrt multiple from values#7935
Merged
rjsparks merged 1 commit intoietf-tools:mainfrom Sep 16, 2024
Merged
fix: start to reconcile internal inconsistencies wrt multiple from values#7935rjsparks merged 1 commit intoietf-tools:mainfrom
rjsparks merged 1 commit intoietf-tools:mainfrom
Conversation
jennifer-richards
approved these changes
Sep 14, 2024
Member
jennifer-richards
left a comment
There was a problem hiding this comment.
lgtm. Could add a test that the assertions fire as expected, but I'm not convinced it's worth the trouble.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.