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
python -mtrace --help is wrong #68837
Comments
While working on bpo-24644, I noticed that the help for python -mtrace is quite wrong. $ python -mtrace --help
Usage: /usr/lib/python3.4/trace.py [OPTIONS] <file> [ARGS] Meta-options: Otherwise, exactly one of the following three options must be given: <elided modifier flags>
|
Maybe it is time to rewrite trace module argument parser using argparse |
Added a patch that clears up the incorrect help. It now accurately reflects the only constraints that the code actually puts on the arguments: if listfuncs and (count or trace):
_err_exit("cannot specify both --listfuncs and (--trace or --count)")
if not (count or trace or report or listfuncs or countcallers):
_err_exit("must specify one of --trace, --count, --report, "
"--listfuncs, or --trackcalls") To reflect both of those constraints, and only those constraints, the part of the help message in question now reads: Otherwise, at least one of the following options must be given: |
A re-write using argparse is submitted in the bpo-22642, that's why I'm closing this issue. Changes from Evan's patch were incorporated in the submitted patch there. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: