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

webbrowser.py update to use argparse.py #68583

Closed
HasanDiwan mannequin opened this issue Jun 6, 2015 · 5 comments
Closed

webbrowser.py update to use argparse.py #68583

HasanDiwan mannequin opened this issue Jun 6, 2015 · 5 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@HasanDiwan
Copy link
Mannequin

HasanDiwan mannequin commented Jun 6, 2015

BPO 24395
Nosy @birkenfeld, @berkerpeksag
Files
  • webbrowser.py
  • 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 = None
    created_at = <Date 2015-06-06.15:22:59.767>
    labels = ['type-feature', 'library']
    title = 'webbrowser.py update to use argparse.py'
    updated_at = <Date 2019-03-15.22:00:55.953>
    user = 'https://bugs.python.org/HasanDiwan'

    bugs.python.org fields:

    activity = <Date 2019-03-15.22:00:55.953>
    actor = 'BreamoreBoy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2015-06-06.15:22:59.767>
    creator = 'Hasan Diwan'
    dependencies = []
    files = ['39641']
    hgrepos = []
    issue_num = 24395
    keywords = []
    message_count = 3.0
    messages = ['244913', '244915', '244918']
    nosy_count = 3.0
    nosy_names = ['georg.brandl', 'berker.peksag', 'Hasan Diwan']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24395'
    versions = ['Python 3.6']

    Linked PRs

    @HasanDiwan
    Copy link
    Mannequin Author

    HasanDiwan mannequin commented Jun 6, 2015

    The webbrowser module uses getopt, which needs to be ripped out and replaced with argparse. The attached file does just this.

    @HasanDiwan HasanDiwan mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jun 6, 2015
    @berkerpeksag
    Copy link
    Member

    Thanks!

    A few comments:

    • New features like this can only go into Python 3.6 (the "default" branch)
    • The CLI is partially tested (see Lib/test/test_webbrowser.py). You'll need to add additional tests (e.g. add tests for the -t and -h options)
    • It would be nice if you could send your changes in a patch format. Please see https://docs.python.org/devguide/patch.html for more information

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jun 6, 2015

    This strikes me as pointless code churn.

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

    Just to confirm, getopt is still used in webbrowser as of the beginning of the Python 3.13 cycle. Replacing it with argparse would improve usability, reduce manual argument parsing code and avoid the use of a legacy module, per #105735

    @hugovk
    Copy link
    Member

    hugovk commented Mar 19, 2024

    Please see PR #117047.

    @hugovk hugovk closed this as completed Apr 13, 2024
    diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    Status: Doc issues
    Development

    No branches or pull requests

    3 participants