Skip to content

unittest.TestProgram.usageExit no longer invoked #67048

Description

@rbtcollins
BPO 22859
Nosy @rbtcollins, @JelleZijlstra, @carlosdamazio
PRs
  • bpo-22859: deprecating unittest.TestProgram.usageExit #30293
  • 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 = None
    closed_at = <Date 2022-03-17.02:41:51.121>
    created_at = <Date 2014-11-13.10:25:22.043>
    labels = ['easy', 'type-bug', 'library', '3.11']
    title = 'unittest.TestProgram.usageExit no longer invoked'
    updated_at = <Date 2022-03-17.02:41:51.120>
    user = 'https://github.com/rbtcollins'

    bugs.python.org fields:

    activity = <Date 2022-03-17.02:41:51.120>
    actor = 'JelleZijlstra'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-03-17.02:41:51.121>
    closer = 'JelleZijlstra'
    components = ['Library (Lib)']
    creation = <Date 2014-11-13.10:25:22.043>
    creator = 'rbcollins'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 22859
    keywords = ['patch', 'easy']
    message_count = 5.0
    messages = ['231102', '409324', '411442', '415383', '415384']
    nosy_count = 3.0
    nosy_names = ['rbcollins', 'JelleZijlstra', 'carlosdamazio']
    pr_nums = ['30293']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue22859'
    versions = ['Python 3.11']

    Activity

    1. rbtcollins commented on Nov 13, 2014

      @rbtcollins
      MemberAuthor

      Before the argparse migration usageExit was invoked and could be extended via subclasses, but it no longer is. We could delete it (and document it being no longer accessible) or put some glue in to reinstate it. I think deleting it is fine, as long as we make the argparse parser objects part of the API (so that folk have a reliable place to poke at to change help).

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Nov 13, 2014
    3. carlosdamazio commented on Dec 29, 2021

      carlosdamaziomannequin
      Mannequin

      Well, to this issue, I'm going to put a PR to remove it and give it a chance for it to being reinstated if you folks want to.

    4. JelleZijlstra commented on Jan 24, 2022

      @JelleZijlstra
      Member

      I suggest we mark the method as deprecated and remove it in 3.13.

      Making the argparse objects public can be done in a separate enhancement request if there is demand for it.

    5. JelleZijlstra commented on Mar 17, 2022

      @JelleZijlstra
      Member

      New changeset 7c353b7 by Carlos Damazio in branch 'main':
      bpo-22859: deprecate unittest.main.TestProgram.usageExit (GH-30293)
      7c353b7

    6. JelleZijlstra commented on Mar 17, 2022

      @JelleZijlstra
      Member

      It is now marked deprecated, to be removed in 3.13.

    7. transferred this issue fromon Apr 10, 2022
    8. hugovk commented on May 26, 2023

      @hugovk
      Member

      Please see #104992 to remove it in 3.13.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.11only security fixeseasystdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions