[issue46453] argparse subparser help text is not escaped before string formatting

2022-01-21 Thread Peder Bergebakken Sundt


Change by Peder Bergebakken Sundt :


--
type:  -> crash

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



[issue46453] argparse subparser help text is not escaped before string formatting

2022-01-21 Thread Peder Bergebakken Sundt


New submission from Peder Bergebakken Sundt :

The `help` text in add_argument of a subparser in argparse can not contain a 
`%`, as it will affect string formatting. This often results in an exception.

See repro.py for a reproduction, tested in Python 3.7 - 3.10.

--
components: Library (Lib)
files: repro.py
messages: 40
nosy: pbsds
priority: normal
severity: normal
status: open
title: argparse subparser help text is not escaped before string formatting
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50569/repro.py

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