1 Fix argparse.py causing warnings when passed to xgettext.
3 This patch was already pushed to upstream and will is part of Python 3.8 and later.
4 https://github.com/python/cpython/pull/16080/
5 https://bugs.python.org/issue37785/
7 --- Python-3.7.5/Lib/argparse.py
8 +++ Python-3.7.5/Lib/argparse.py
9 @@ -1207,8 +1207,9 @@ class FileType(object):
10 return open(string, self._mode, self._bufsize, self._encoding,
13 - message = _("can't open '%s': %s")
14 - raise ArgumentTypeError(message % (string, e))
15 + args = {'filename': string, 'error': e}
16 + message = _("can't open '%(filename)s': %(error)s")
17 + raise ArgumentTypeError(message % args)
20 args = self._mode, self._bufsize