[issue44986] Date formats in help messages of argparse

2021-08-23 Thread Matías Senger

New submission from Matías Senger :

If the help message of an argument in argparse contains a date format, e.g. 
%Y-%m-%d, it crashes when printing the help after being invoked with the -h 
option. Uploaded an example.

--
components: Library (Lib)
files: deleteme.py
messages: 400183
nosy: mail.de.senger
priority: normal
severity: normal
status: open
title: Date formats in help messages of argparse
type: crash
versions: Python 3.11
Added file: https://bugs.python.org/file50232/deleteme.py

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



[issue44986] Date formats in help messages of argparse

2021-08-26 Thread Matías Senger

Matías Senger  added the comment:

With this change there should be no need to escape anything, and it is still 
compatible with the old formatting. Plus, with the current implementation if 
you forget to escape something like %Y the error message is not helpful at all 
and only happens when invoked with -h option.

--

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