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-condensedxxxx]
-h, --help show this help message and exit
--no-condensedxxxx 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.
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 bpo-16623 and move this forward here.
Misc/NEWSso that it is managed by towncrier #552
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
The text was updated successfully, but these errors were encountered: