-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-21315: Fix parsing of 8000 encoded words with missing leading ws. #13425
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
Conversation
Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315.
Misc/NEWS.d/next/Library/2019-05-19-10-48-46.bpo-21315.PgXVqF.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2019-05-19-10-48-46.bpo-21315.PgXVqF.rst
Outdated
Show resolved
Hide resolved
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 |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @bitdancer: please review the changes made to this pull request. |
I'm sorry, but is there any way you could do this over using a separate commit to show the changes from the base PR? It is hard to review your fixes from a force push, because I can't see the diff between the fixed version and the code I originally looked at. (Although, it's been so long since I've done a review outside of 'reviewable' that I don't remember if github reviews actually let me see the diff along with the associated comment or not :) But even if not, it is still much easier to check for the requested changes looking at a commit diff than looking at a completely changed PR. |
@bitdancer Done. The 2nd commit includes the changes that you requested. I had to force push again to split the changes into two commits. I will keep it in mind next time to keep the requested changes after a review in a separate commit. |
Also, I don't think you can see the comments after I made the changes if those lines change/go away. You can see the old diff with comments and then the new changes I made (which is now separated out in a separate commit), but might have to do a bit of jumping between them or seeing them side by side. |
This is also not a security issue, so perhaps the backport t0 3.6 label isn't required. |
@warsaw: Please replace |
…honGH-13425) * bpo-21315: Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315. (cherry picked from commit 66c4f3f) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
GH-13846 is a backport of this pull request to the 3.7 branch. |
…13425) (#13846) * bpo-21315: Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315. (cherry picked from commit 66c4f3f) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
pythonGH-13425) (pythonGH-13846) * bpo-21315: Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315. (cherry picked from commit 66c4f3f) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com> (cherry picked from commit dc20fc4) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
…GH-13425) (GH-15655) * [bpo-21315](https://bugs.python.org/issue21315): Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on [bpo-21315](https://bugs.python.org/issue21315). (cherry picked from commit 66c4f3f) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com> (cherry picked from commit dc20fc4) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> https://bugs.python.org/issue21315
@epicfaace The infinite loop was a result of this PR, so I don't think it does need to be backported to those versions. Having said that, if you can find out a test case that can be used to trigger an infinite loop in 3.6/3.5, let me know. |
Yeah, I just tested the new test cases on 3.6 and 3.5, and although some tests fail, none of the tests goes in an infinite loop. Thanks. |
…hon#13425) * bpo-21315: Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315.
Because of missing leading whitespace, encoded word would get parsed as
unstructured token. This patch fixes that by looking for encoded words when
splitting tokens with whitespace.
Missing trailing whitespace around encoded word now register a defect
instead.
Original patch suggestion by David R. Murray on bpo-21315.
https://bugs.python.org/issue21315