gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API)#102990
gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API)#102990tdwyer wants to merge 2 commits into
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
gpshead
left a comment
There was a problem hiding this comment.
thanks for the PR!
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
1 similar comment
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
theta682
left a comment
There was a problem hiding this comment.
stylistic suggestions
Sorry, something went wrong.
|
You could use Core developers can help to remove the redundant requests for review. Before that you may need to force push the correct commits, or close this PR and start a new one. :) |
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
|
I'm going to have to make a new PR... Git is all messed up now... |
Sorry, something went wrong.
|
@gpshead @CharlieZhao95 @theta682 I had to create a new PR because I messed up Git when trying to push the changes #105127 |
Sorry, something went wrong.
Pull Request title
gh-102988: This PR is designed to detect parsing errors and return an empty tuple to indicate the parsing error. Additionally, this PR updates the
test_email.pyto check for these bugs, as well as, adds some other wacky Address Headers that are in the examples of RFC 2822 and makes sure they are being parsed correctly.I realize that this PR dose not actually track down the bug and fix it. It simply detects the error has happened and returns a parsing error. However,
Lib/email/utils.pyis a much simple file thanLib/email/_parseaddr.py, so it is much easier to review this change. Additionally, there are actually multiple bugs which are causing erroneous output. Tracing the code flow for each and fixing them would be prone to error considering all of the wacky stuff that RFC 2822 allows for in Address headers. Finally, this change is actually rather simple.