-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
bpo-29412: patched string index out of range error in get_word function of _head… #6907
Conversation
…er_value_parser.py and created tests in test__header_value_parser.py for CFWS.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. When your account is ready, please add a comment in this pull request Thanks again to your contribution and we look forward to looking at it! |
I verified that I signed the CLA. let me know if there is anything else I need to do! :) |
else: | ||
token, value = get_atom(value) | ||
if leader is not None: | ||
token[:0] = [leader] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be no need to copy these two lines from below.
I'm running into this bug in the alot package (the pazz/alot#1367 referenced bug above). I'm using python 3.5 so I've backported this fix there and I run into another issue where the backtrace ends like this:
So this change isn't fixing everything for me, but maybe that's because on python 3.5 there's something else missing? The header that's failing is
in case that helps here. |
I have tested the patch (removing the two lines mentioned by @zooba) and it fixes the issue for me (using python 3.7). @TyrannosourceExe Do you mind removing this two lines? I will love to see this merged. |
Since @TyrannosourceExe hasn't responded in a while, I am willing to pick up this patch and get it merged. I'll wait for a week or though if @TyrannosourceExe wants to work on the comments. |
@maxking thanks for picking this up. I was hitting it daily with my email client, I end up patching the email library in my system, and after 4 months using this patch I haven't have problems. |
…er_value_parser.py and created tests in test__header_value_parser.py for empty string.
Backport Pull Request title
Changes suggested to be applied to python 3.5 , 3.6 , and 3.7
https://bugs.python.org/issue29412