-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'email.errors' has no attribute 'InvalidHeaderError'. #93010
Comments
Oh wow, nice find. |
Nice find! On a meta-level though this suggests that CPython could really benefit from adopting some static analysis tooling and/or coverage requirements which are table stakes for any critical project... maybe I can argue for that instead of PBT at the next summit 😅 |
Agreed! FWIW I tried to run flake8 with a lot of ignored errors and manual processing, and I believe I now have another handful of bugs/PRs to report... 😅
|
For anyone curious about the result of running |
* fix issue 93010 Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* fix issue 93010 Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 71abeb0) Co-authored-by: oda-gitso <[email protected]>
* fix issue 93010 Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 71abeb0) Co-authored-by: oda-gitso <[email protected]>
@The-Compiler Thanks for the above reports. This issue is now fix, thus closing. |
* fix issue 93010 Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 71abeb0) Co-authored-by: oda-gitso <[email protected]>
* fix issue 93010 Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 71abeb0) Co-authored-by: oda-gitso <[email protected]>
Also adds workaround for python/cpython#93010
Also adds workaround for python/cpython#93010 (cherry picked from commit 9afcad1)
python/cpython#93010 has now been fixed, but python/cpython#87112 is still broken.
Bug report
email._header_value_parser
tries to raiseerrors.InvalidHeaderError
, but that does not exist (and as far as I can tell, never did):Code:
cpython/Lib/email/_header_value_parser.py
Lines 2381 to 2383 in d853758
This was added in 97f43c0 by @bitdancer pretty much some 10 years ago, and I don't think it ever worked (but nor could I find anyone running into this so far): The git history doesn't know anything about an
email.errors.InvalidHeaderError
.Found via Hypothesis while testing my own parsing code - cc @Zac-HD if you want to see another instance of "the curse of hypothesis" 😉
Your environment
The text was updated successfully, but these errors were encountered: