Repository navigation
webbrowser.py update to use argparse.py #68583
Copy link
Copy link
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
The webbrowser module uses getopt, which needs to be ripped out and replaced with argparse. The attached file does just this.
- addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
on Jun 6, 2015 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
This strikes me as pointless code churn.
Just to confirm,
getoptis still used inwebbrowseras 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 #105735Reacted by James De BiasPlease see PR #117047.
- added a commit that references this issue
on Apr 13, 2024
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsDoc issues
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:
Linked PRs
getoptwithargparse, add long options #117047