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
textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace #66026
Comments
Failing test case: " \tboo\n \tghost" expected: " \tboo\n\tghost" |
Confirmed that the test case fails on 2.7, 3.4, and 3.5 |
This one isn't hard. Would you like to make a patch? If not, I get to it this evening. |
Hi Raymond- Rob and I have a patch ready. We are figuring out how to upload/submit it. New to this... :) |
YJ and I are adding a patch and an additional test. |
Raymond confirmed that the issue exists on 2.7 and 3.4, so we'll keep those in the version list. Whoever makes the commit will take care of backporting the patch, though. |
Tested and it works fine on CentOS 6.4 in 2.7, 3.4 and 3.5 |
I've got it from here. |
Not surprising also occurs on Python 3.2, 3.3, & 3.6. |
LGTM. But the implementation can be more efficient. Here is optimized patch. 34e88a05562f.diff: bpo-21827.patch: |
It's one of the PEPs (I forget which one). We only apply non-security fixes to the most recent non-development branch...except that for now we also apply bug fixes to 2.7. So, 2.7, 3.5, and 3.6 are the targets for this issue. |
Serhiy, your way looks best. Go ahead with it. |
I thought that 3.4 will switch to "security fixes only" mode after releasing first release since releasing 3.5.0. It was so with 3.2 and 3.3. |
You are right, I'd forgotten we hadn't done 3.4 final yet. |
New changeset faeeb8dbe432 by Serhiy Storchaka in branch '3.4': New changeset c307ae7b3d9f by Serhiy Storchaka in branch '2.7': New changeset 3f29be82c944 by Serhiy Storchaka in branch '3.5': New changeset 8d3932671e48 by Serhiy Storchaka in branch 'default': |
Thank you Robert for your report and patch. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: