[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

[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-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 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 R. David Murray
Changes by R. David Murray : -- versions: +Python 3.4 ___ 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: You are right, I'd forgotten we hadn't done 3.4 final yet. -- ___ Python tracker ___

[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

[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 levkivs...@gmail.com: -- nosy: +levkivskyi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org http://bugs.python.org/issue21827

[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 rep...@bugs.python.org http://bugs.python.org/issue21827 ___ ___ Python-bugs-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

[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 raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827 ___

[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 rep...@bugs.python.org

[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 rep...@bugs.python.org http://bugs.python.org/issue21827

[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 rep...@bugs.python.org http://bugs.python.org/issue21827

[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 zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org http://bugs.python.org/issue21827 ___

[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 li.robertj+pythonb...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file35727/cb18733ce8f1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827

[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 ___

[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 li.robertj+pyt...@gmail.com: Added file: http://bugs.python.org/file35731/34e88a05562f.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21827 ___