[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-05-10 Thread Xiang Zhang

Xiang Zhang added the comment:

I can't reproduce the failure in anyway. :-( Could you do some investigation 
and give more info?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-05-10 Thread wim glenn

wim glenn added the comment:

The test "test_help_non_breaking_spaces" from Zhang's commit fails on my 
platform (other 1563 tests in the module all pass).  

Interestingly, if running the entire test suite, it doesn't fail.  It's only 
when executing the test_argparse.py module directly that causes the failure.

I guess there is some mutable state, or the test doesn't entirely setup 
correctly.

--
nosy: +wim.glenn

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +999

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-21 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks Serhiy. 

BTW, #16623 is about 2.7 and the cause is wrap doesn't handle unicode 
non-breaking spaces right. So it's not the same thing as here.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 98cde683b9c6 by Xiang Zhang in branch '3.5':
Issue #29290: argparse help messages won't wrap at non-breaking spaces.
https://hg.python.org/cpython/rev/98cde683b9c6

New changeset 1754722ec296 by Xiang Zhang in branch '3.6':
Issue #29290: Merge 3.5.
https://hg.python.org/cpython/rev/1754722ec296

New changeset c47a72627f0c by Xiang Zhang in branch 'default':
Issue #29290: Merge 3.6.
https://hg.python.org/cpython/rev/c47a72627f0c

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

You perhaps need to change your email provider Xiang. It fails too often.

--
assignee:  -> xiang.zhang
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-21 Thread Xiang Zhang

Xiang Zhang added the comment:

v2 addresses the comments. I didn't receive the review notification mail so 
just saw them today. :-(

--
stage:  -> patch review
Added file: 
http://bugs.python.org/file46376/argparse-help-non-breaking-spaces-2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-17 Thread Peter Otten

Changes by Peter Otten <__pete...@web.de>:


--
nosy: +peter.otten

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Xiang Zhang

Xiang Zhang added the comment:

I think this is a regression when coming to 3.x. In 2.7, r'\s+' is by default 
in ASCII mode and won't match unicode non-breaking spaces. In 3.x it's by 
default unicode mode so non-breaking spaces are replaced by spaces. I think we 
can just use [ \t\n\r\f\v]+.

Since here are more active core devs I am going to close #16623 and move this 
forward here.

--
keywords: +patch
nosy: +paul.j3, roysmith, serhiy.storchaka
versions: +Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file46312/argparse-help-non-breaking-spaces.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Xiang Zhang

Xiang Zhang added the comment:

textwrap has been fixed in #20491 but this problem still exists. The reason 
seems to be that argparse replaces the non-break spaces with spaces:

before self.whitespace_matcher.sub
'Disable default font-style: condensed.  Also disables "M+\\xa01M" condensed 
monospace.'
after self.whitespace_matcher.sub
'Disable default font-style: condensed. Also disables "M+ 1M" condensed 
monospace.'

--
nosy: +xiang.zhang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Martin Panter

Martin Panter added the comment:

Maybe a duplicate of Issue 16623

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Here's a slightly simpler demo, without the (fortunately harmless) typo.

--
Added file: http://bugs.python.org/file46311/argparse_nobreak.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Steven D'Aprano

Changes by Steven D'Aprano :


Removed file: http://bugs.python.org/file46310/argparse_nobreak.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29290] argparse breaks long lines on NO-BREAK SPACE

2017-01-16 Thread Steven D'Aprano

New submission from Steven D'Aprano:

argparse help incorrectly breaks long lines on U+u00A0 NO-BREAK SPACE.

The attached script has been run on Python 3.5.3rc1 in a terminal window 80 
columns wide, and it produces output::

usage: argparse_nobreak.py [-h] [--no-condensed]

optional arguments:
  -h, --help  show this help message and exit
  --no-condensed  Disable default font-style: condensed. Also disables 
"M+
  1M" condensed monospace.


I expected the last line should have broken just before the "M+ 1M", rather 
than in the middle.

See also #20491.

--
components: Library (Lib)
files: argparse_nobreak.py
messages: 285607
nosy: steven.daprano
priority: normal
severity: normal
status: open
title: argparse breaks long lines on NO-BREAK SPACE
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file46310/argparse_nobreak.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com