Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unittest.TestProgram.usageExit no longer invoked #67048

Closed
rbtcollins opened this issue Nov 13, 2014 · 6 comments
Closed

unittest.TestProgram.usageExit no longer invoked #67048

rbtcollins opened this issue Nov 13, 2014 · 6 comments
Labels
3.11 only security fixes easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@rbtcollins
Copy link
Member

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']

    @rbtcollins
    Copy link
    Member Author

    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).

    @rbtcollins rbtcollins added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Nov 13, 2014
    @iritkatriel iritkatriel added easy 3.11 only security fixes labels Nov 30, 2021
    @carlosdamazio
    Copy link
    Mannequin

    carlosdamazio mannequin commented Dec 29, 2021

    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.

    @JelleZijlstra
    Copy link
    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.

    @JelleZijlstra
    Copy link
    Member

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

    @JelleZijlstra
    Copy link
    Member

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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @hugovk
    Copy link
    Member

    hugovk commented May 26, 2023

    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
    Labels
    3.11 only security fixes easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants