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...
|
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: