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