Skip to content

webbrowser.py update to use argparse.py #68583

Description

@HasanDiwan
mannequin
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

    Activity

    1. HasanDiwan commented on Jun 6, 2015

      HasanDiwanmannequin
      MannequinAuthor

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

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Jun 6, 2015
    3. berkerpeksag commented on Jun 6, 2015

      @berkerpeksag
      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
    4. BreamoreBoy commented on Jun 6, 2015

      BreamoreBoymannequin
      Mannequin

      This strikes me as pointless code churn.

    5. transferred this issue fromon Apr 10, 2022
    6. CAM-Gerlach commented on Jun 13, 2023

      @CAM-Gerlach
      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

    7. hugovk commented on Mar 19, 2024

      @hugovk
      Member

      Please see PR #117047.

    8. added a commit that references this issue on Apr 13, 2024
    9. moved this from Features to Doc issues in Argparse issueson Apr 13, 2024
    10. added a commit that references this issue on Apr 17, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions