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

"python -m pdb --help" does not work #81984

Closed
blueyed mannequin opened this issue Aug 9, 2019 · 4 comments
Closed

"python -m pdb --help" does not work #81984

blueyed mannequin opened this issue Aug 9, 2019 · 4 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@blueyed
Copy link
Mannequin

blueyed mannequin commented Aug 9, 2019

BPO 37803
Nosy @blueyed, @benjaminp, @miss-islington
PRs
  • bpo-37803: pdb: fix handling of options (--help / --version) #15193
  • [3.8] closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193) #16066
  • [3.7] closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193) #16067
  • 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 2019-09-12.15:46:40.240>
    created_at = <Date 2019-08-09.14:52:52.766>
    labels = ['3.7', '3.8', 'type-bug', 'library', '3.9']
    title = '"python -m pdb --help" does not work'
    updated_at = <Date 2019-09-12.16:05:55.126>
    user = 'https://github.com/blueyed'

    bugs.python.org fields:

    activity = <Date 2019-09-12.16:05:55.126>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-12.15:46:40.240>
    closer = 'benjamin.peterson'
    components = ['Library (Lib)']
    creation = <Date 2019-08-09.14:52:52.766>
    creator = 'blueyed'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37803
    keywords = ['patch']
    message_count = 4.0
    messages = ['349291', '352205', '352209', '352210']
    nosy_count = 3.0
    nosy_names = ['blueyed', 'benjamin.peterson', 'miss-islington']
    pr_nums = ['15193', '16066', '16067']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37803'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9']

    @blueyed
    Copy link
    Mannequin Author

    blueyed mannequin commented Aug 9, 2019

    The long options passed to getopt.getopt should not include the leading dashes:

        % python -m pdb --help
        Traceback (most recent call last):
          File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
            "__main__", mod_spec)
          File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
            exec(code, run_globals)
          File "/home/daniel/src/pdbpp/pdb.py", line 1672, in <module>
            pdb.main()
          File "/usr/lib/python3.7/pdb.py", line 1662, in main
            opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', '--command='])
          File "/usr/lib/python3.7/getopt.py", line 93, in getopt
            opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
          File "/usr/lib/python3.7/getopt.py", line 157, in do_longs
            has_arg, opt = long_has_args(opt, longopts)
          File "/usr/lib/python3.7/getopt.py", line 174, in long_has_args
            raise GetoptError(_('option --%s not recognized') % opt, opt)
        getopt.GetoptError: option --help not recognized

    (it works in Python 2.7)

    @blueyed blueyed mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 9, 2019
    @benjaminp
    Copy link
    Contributor

    New changeset 855df7f by Benjamin Peterson (Daniel Hahler) in branch 'master':
    closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)
    855df7f

    @miss-islington
    Copy link
    Contributor

    New changeset 7da8c0a by Miss Islington (bot) in branch '3.7':
    closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)
    7da8c0a

    @miss-islington
    Copy link
    Contributor

    New changeset 21bfff9 by Miss Islington (bot) in branch '3.8':
    closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)
    21bfff9

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants