You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unittest.TestProgram.usageExit no longer invoked #67048
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).
Activity
rbtcollins commentedon Nov 13, 2014
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).
carlosdamazio commentedon 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 commentedon Jan 24, 2022
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 commentedon Mar 17, 2022
New changeset 7c353b7 by Carlos Damazio in branch 'main':
bpo-22859: deprecate unittest.main.TestProgram.usageExit (GH-30293)
7c353b7
JelleZijlstra commentedon Mar 17, 2022
It is now marked deprecated, to be removed in 3.13.
hugovk commentedon May 26, 2023
Please see #104992 to remove it in 3.13.