This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Minshall
Recipients Mathias Ettinger, Minshall, eric.araujo, hroncok, paul.j3, zachrahan
Date 2019-12-05.06:00:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1575525618.39.0.236559969674.issue29298@roundup.psfhosted.org>
In-reply-to
Content
while waiting for a fix, would it be possible to document in the argparse documentation that the 'dest' parameter is required (at least temporarily) for add_subparsers()?  (somewhere near file:///usr/share/doc/python/html/library/argparse.html#sub-commands)

gratuitous diff:  the pull request from 2017 would probably fix it.  my diffs are here (from: Python 3.8.0 (default, Oct 23 2019, 18:51:26).  (the pull request changes the utility '_get_action_name'; i wasn't sure of side-effects with other callers, so changed nearer the failure location.)
----
*** new/argparse.py     2019-12-05 11:16:37.618985247 +0530
--- old/argparse.py     2019-10-24 00:21:26.000000000 +0530
***************
*** 2017,2030 ****
          for action in self._actions:
              if action not in seen_actions:
                  if action.required:
!                     ra = _get_action_name(action)
!                     if ra is None:
!                         if not action.choices == {}:
!                             choice_strs = [str(choice) for choice in action.choices]
!                             ra = '{%s}' % ','.join(choice_strs)
!                         else:
!                             ra = '<unknown>'
!                     required_actions.append(ra)
                  else:
                      # Convert action default now instead of doing it before
                      # parsing arguments to avoid calling convert functions
--- 2017,2023 ----
          for action in self._actions:
              if action not in seen_actions:
                  if action.required:
!                     required_actions.append(_get_action_name(action))
                  else:
                      # Convert action default now instead of doing it before
                      # parsing arguments to avoid calling convert functions
History
Date User Action Args
2019-12-05 06:00:18Minshallsetrecipients: + Minshall, eric.araujo, zachrahan, paul.j3, hroncok, Mathias Ettinger
2019-12-05 06:00:18Minshallsetmessageid: <1575525618.39.0.236559969674.issue29298@roundup.psfhosted.org>
2019-12-05 06:00:18Minshalllinkissue29298 messages
2019-12-05 06:00:18Minshallcreate