GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [argparse] Add required argument to add_subparsers · Issue #70697 · python/cpython

[argparse] Add required argument to add_subparsers #70697

New issue
Copy link
New issue
Copy link
Closed
Closed
[argparse] Add required argument to add_subparsers#70697
Copy link
Assignees
merwok
Labels
3.7 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

memeplex
mannequin
opened on Mar 8, 2016
Issue body actions
BPO 26510
Nosy @ned-deily, @merwok, @asottile, @miss-islington
PRs
  • bpo-26510: Allow argparse add_subparsers to take required kwarg. #3027
  • bpo-33109: argparse subparsers are once again not required by default #6919
  • [3.7] bpo-33109: argparse subparsers are once again not required by default (GH-6919) #7089
  • bpo-33109: Remove now-obsolete What's New entry for bpo-26510. #7609
  • [3.7] bpo-33109: Remove now-obsolete What's New entry for bpo-26510. (GH-7609) #7610
  • bpo-26510: Add versionchanged for required arg of add_subparsers #16588
  • [3.8] bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588) #16608
  • [3.7] bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588) #16609
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/merwok'
    closed_at = <Date 2017-09-20.21:36:42.299>
    created_at = <Date 2016-03-08.13:56:01.475>
    labels = ['3.7', 'type-feature', 'library']
    title = '[argparse] Add required argument to add_subparsers'
    updated_at = <Date 2019-10-15.07:30:26.268>
    user = 'https://bugs.python.org/memeplex'

    bugs.python.org fields:

    activity = <Date 2019-10-15.07:30:26.268>
    actor = 'ned.deily'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2017-09-20.21:36:42.299>
    closer = 'eric.araujo'
    components = ['Library (Lib)']
    creation = <Date 2016-03-08.13:56:01.475>
    creator = 'memeplex'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 26510
    keywords = []
    message_count = 12.0
    messages = ['261358', '261535', '300282', '302660', '317500', '317512', '319265', '319267', '354060', '354061', '354062', '354700']
    nosy_count = 7.0
    nosy_names = ['bethard', 'ned.deily', 'eric.araujo', 'memeplex', 'paul.j3', 'Anthony Sottile', 'miss-islington']
    pr_nums = ['3027', '6919', '7089', '7609', '7610', '16588', '16608', '16609']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue26510'
    versions = ['Python 3.7']

    Activity

    1. memeplex commented on Mar 8, 2016

      @memeplex
      memeplexmannequin
      on Mar 8, 2016
      MannequinAuthor
      More actions

      It's useful in combination with dest. Currently you have to set required as an attribute. This is not only inconsistent but not even documented as a valid usage (in general, it's not clear from the docs whether attribute setting -vs argument passing- is a valid usage).

    2. memeplex
      added
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancementA feature request or enhancement
      on Mar 8, 2016
    3. memeplex
      changed the title [-]Add required argument to add_subparsers[/-] [+][argparse] Add required argument to add_subparsers[/+] on Mar 8, 2016
    4. paulj3 commented on Mar 11, 2016

      @paulj3
      paulj3mannequin
      on Mar 11, 2016
      Mannequin
      More actions

      This has been raised before. I think

      http://bugs.python.org/issue9253

      is the correct issue.

      It used to be that 'subparsers' were required. But there was a change in how 'required' arguments were tested, and 'subparsers' fell through the cracks. Now subparsers are optional (at least the parser doesn't raise an error). The temporary fix is to set the 'required' attribute after creation.

      I proposed that the default be 'required=True', and that we be allowed to set the parameter. But that patch, like many others, has languished.

    5. asottile commented on Aug 15, 2017

      @asottile
      asottilemannequin
      on Aug 15, 2017
      Mannequin
      More actions

      I've added a patch for this #3027

      Would love to get a review so it could be included

    6. merwok
      added
      3.7 (EOL)end of lifeend of life
      on Sep 20, 2017
    7. merwok
      self-assigned this
      on Sep 20, 2017
    8. merwok commented on Sep 20, 2017

      @merwok
      merwok
      on Sep 20, 2017
      Member
      More actions

      New changeset aaf6fc0 by Éric Araujo (Anthony Sottile) in branch 'master':
      bpo-26510: make argparse subparsers required by default (bpo-3027)
      aaf6fc0

    9. merwok
      closed this as completedon Sep 20, 2017
    10. ned-deily commented on May 24, 2018

      @ned-deily
      ned-deily
      on May 24, 2018
      Member
      More actions

      New changeset 8ebf5ce by Ned Deily in branch 'master':
      bpo-33109: argparse subparsers are once again not required by default (GH-6919)
      8ebf5ce

    11. ned-deily commented on May 24, 2018

      @ned-deily
      ned-deily
      on May 24, 2018
      Member
      More actions

      New changeset dd7a255 by Ned Deily (Miss Islington (bot)) in branch '3.7':
      bpo-33109: argparse subparsers are once again not required by default (GH-6919) (GH-7089)
      dd7a255

    12. ned-deily commented on Jun 11, 2018

      @ned-deily
      ned-deily
      on Jun 11, 2018
      Member
      More actions

      New changeset ef057bf by Ned Deily in branch 'master':
      bpo-33109: Remove now-obsolete What's New entry for bpo-26510. (GH-7609)
      ef057bf

    13. ned-deily commented on Jun 11, 2018

      @ned-deily
      ned-deily
      on Jun 11, 2018
      Member
      More actions

      New changeset a73399d by Ned Deily (Miss Islington (bot)) in branch '3.7':
      bpo-33109: Remove now-obsolete What's New entry for bpo-26510. (GH-7609) (GH-7610)
      a73399d

    14. miss-islington commented on Oct 7, 2019

      @miss-islington
      miss-islington
      on Oct 7, 2019
      Contributor
      More actions

      New changeset 9e71917 by Miss Islington (bot) (Adam J. Stewart) in branch 'master':
      bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
      9e71917

    15. miss-islington commented on Oct 7, 2019

      @miss-islington
      miss-islington
      on Oct 7, 2019
      Contributor
      More actions

      New changeset 50b8d57 by Miss Islington (bot) in branch '3.7':
      bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
      50b8d57

    16. miss-islington commented on Oct 7, 2019

      @miss-islington
      miss-islington
      on Oct 7, 2019
      Contributor
      More actions

      New changeset f19b4d7 by Miss Islington (bot) in branch '3.8':
      bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
      f19b4d7

    17. ned-deily commented on Oct 15, 2019

      @ned-deily
      ned-deily
      on Oct 15, 2019
      Member
      More actions

      New changeset f168c17 by Ned Deily (Miss Islington (bot)) in branch '3.7':
      bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
      f168c17

    18. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @merwok
      merwok

    Labels

    3.7 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.