[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Robert for your report and patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset faeeb8dbe432 by Serhiy Storchaka in branch '3.4': Issue #21827: Fixed textwrap.dedent() for the case when largest common https://hg.python.org/cpython/rev/faeeb8dbe432 New changeset c307ae7b3d9f by Serhiy Storchaka in branch '2.7': Issue #21827: Fix

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread R. David Murray
R. David Murray added the comment: You are right, I'd forgotten we hadn't done 3.4 final yet. -- ___ Python tracker ___ ___ Python-bug

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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. -- ___ Python tracker _

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, your way looks best. Go ahead with it. -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___ __

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread R. David Murray
R. David Murray added the comment: 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. -- versions: -Python 3

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But the implementation can be more efficient. Here is optimized patch. 34e88a05562f.diff: $ ./python -m timeit -s 'import textwrap; s = "{0} x\n{0}\tx\n".format(" "*100)' -- 'textwrap.dedent(s)' 1 loops, best of 3: 87.5 usec per loop $ ./python -m t

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-10-28 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: Not surprising also occurs on Python 3.2, 3.3, & 3.6. I'm not sure whether fixes like this are suitable to be merged into 3.2/3.3.(is there a document describing this?) -- nosy: +John.Mark.Vandenberg versions: +Python 3.2, Python 3.3, Python 3.6

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-08-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've got it from here. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-08-02 Thread Daniel Eriksson
Daniel Eriksson added the comment: Tested and it works fine on CentOS 6.4 in 2.7, 3.4 and 3.5 -- nosy: +dan...@starstable.com, ezio.melotti ___ Python tracker ___ ___

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
Changes by Robert Li : Added file: http://bugs.python.org/file35731/34e88a05562f.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Zachary Ware
Zachary Ware added the comment: 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. -- versions: +Python 2.7, Python 3.4 ___ Pyth

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
Changes by Robert Li : -- keywords: +patch Added file: http://bugs.python.org/file35727/cb18733ce8f1.diff ___ Python tracker ___ ___ P

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
Robert Li added the comment: YJ and I are adding a patch and an additional test. -- hgrepos: +258 versions: -Python 2.7, Python 3.4 ___ Python tracker ___ __

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread YJ Chen
YJ Chen added the comment: Hi Raymond- Rob and I have a patch ready. We are figuring out how to upload/submit it. New to this... :) -- ___ Python tracker ___ ___

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This one isn't hard. Would you like to make a patch? If not, I get to it this evening. -- keywords: +easy ___ Python tracker ___ _

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Confirmed that the test case fails on 2.7, 3.4, and 3.5 -- priority: normal -> high stage: -> needs patch versions: +Python 2.7, Python 3.4 ___ Python tracker _

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2014-06-22 Thread Robert Li
New submission from Robert Li: Failing test case: " \tboo\n \tghost" expected: " \tboo\n\tghost" returns: " \tboo\n \tghost" -- components: Library (Lib) messages: 221277 nosy: pitrou, r.david.murray, robertjli, yjchen priority: normal severity: normal status: open