bpo-32178: Fix IndexError trying to parse 'To' header starting with ':'.#15044
Conversation
|
I will review this. |
| if x.token_type == 'quoted-string': | ||
| quote = True | ||
| if quote: | ||
| if self and quote: |
There was a problem hiding this comment.
in which case, self would be None|False|0?
There was a problem hiding this comment.
I think it should be len(self) != 0 for being more explicit, like in the method above, I'll make the changes.
This would be when the TokenList is empty with no tokens.
CuriousLearner
left a comment
There was a problem hiding this comment.
Overall looks good. Just one more minor suggestion. Please find my suggestion inline.
Co-Authored-By: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
CuriousLearner
left a comment
There was a problem hiding this comment.
You may re-run the Travis tests and they should pass. Just one more nit-pick.
Overall LGTM 🌮 💯
|
Thanks @maxking for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
…:'. (pythonGH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178 (cherry picked from commit 09a1872) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
|
GH-15213 is a backport of this pull request to the 3.8 branch. |
|
GH-15214 is a backport of this pull request to the 3.7 branch. |
…:'. (pythonGH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178 (cherry picked from commit 09a1872) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
…:'. (GH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178 (cherry picked from commit 09a1872) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
…:'. (GH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178 (cherry picked from commit 09a1872) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
…:'. (pythonGH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178
…:'. (pythonGH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178
…:'. (pythonGH-15044) This should fix the IndexError trying to retrieve `DisplayName.display_name` and `DisplayName.value` when the `value` is basically an empty string. https://bugs.python.org/issue32178
This should fix the IndexError trying to retrieve
DisplayName.display_nameandDisplayName.valuewhen thevalueis basically an empty string.https://bugs.python.org/issue32178
Automerge-Triggered-By: @maxking