Skip to content

Argparse.parse_args exits on unrecognized option with exit_on_error=False#85427

@matthewhughes934

Description

@matthewhughes934
BPO41255
Nosy@rhettinger, @tirkarthi, @matthewhughes934, @jacobtylerwalls, @bigbirdcode, @joshmeranda
PRs
  • bpo-41255: handle argparse errors with exit_on_error=False consistently #27295
  • gh-85427: Prevent exits if ArgumentParser.exit_on_error is False #30832
  • Files
  • exit_on_error_tests.patch
  • 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=Noneclosed_at=Nonecreated_at=<Date2020-07-09.08:40:33.198>labels= ['type-bug', 'library', '3.9'] title='Argparse.parse_args exits on unrecognized option with exit_on_error=False'updated_at=<Date2022-01-29.03:10:17.942>user='https://github.com/matthewhughes934'

    bugs.python.org fields:

    activity=<Date2022-01-29.03:10:17.942>actor='jacobtylerwalls'assignee='none'closed=Falseclosed_date=Nonecloser=Nonecomponents= ['Library (Lib)'] creation=<Date2020-07-09.08:40:33.198>creator='mhughes'dependencies= [] files= ['49310'] hgrepos= [] issue_num=41255keywords= ['patch'] message_count=10.0messages= ['373382', '373383', '373385', '373405', '373437', '373440', '373470', '396345', '397975', '401629'] nosy_count=7.0nosy_names= ['rhettinger', 'paul.j3', 'xtreak', 'mhughes', 'jacobtylerwalls', 'bigbird', 'joshmeranda'] pr_nums= ['27295', '30832'] priority='normal'resolution=Nonestage='patch review'status='open'superseder=Nonetype='behavior'url='https://bugs.python.org/issue41255'versions= ['Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10only security fixes3.11only security fixes3.12only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      Status

      Doc issues

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions