GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Undeprecate getopt and optparse · Issue #126180 · python/cpython

Undeprecate getopt and optparse #126180

New issue
Copy link
New issue
Copy link
Closed
#126227
Closed
Undeprecate getopt and optparse#126180
#126227
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement

Description

@serhiy-storchaka
serhiy-storchaka
opened on Oct 30, 2024
Issue body actions

See discussion at https://discuss.python.org/t/getopt-and-optparse-vs-argparse/69618. Seems that all support this.

argparse has many issues, some are fundamental and cannot be easily worked around. Its implements behavior different from the behavior of other Unix/Linux programs in subtle ways. It is still not mature to be the preferable Python module for CLI.

getopt is a de-facto cross-language standard. Many programmers that came from other programming languges are already familiar with it. It is very simple, so even if there are other CLI modules, it should be left in the stdlib.

optparse provides an object-oriented interface. Even if it has less features than argparse, it is more stable and has less bugs. It should be the preferable Python module for CLI.

Linked PRs

  • gh-126180: Undeprecate getopt and optparse #126186
  • gh-126180: Remove getopt and optparse deprecation notices #126227
  • [3.13] gh-126180: Remove getopt and optparse deprecation notices (GH-126227) #128191
Reacted by Wulian233, Mats Wichmann, Raymond Hettinger and Jack Lloyd

Activity

  1. serhiy-storchaka
    added 2 commits that reference this issue on Oct 30, 2024

    pythongh-126180: Undeprecate the optparse and getopt modules

    507bdfc

    pythongh-126180: Undeprecate the optparse and getopt modules

    097cba2
  2. picnixz
    added
    type-featureA feature request or enhancementA feature request or enhancement
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    and removed
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Oct 30, 2024
  3. github-project-automation
    moved this to Todo in docs issueson Oct 31, 2024
  4. willingc
    added this to docs issueson Oct 31, 2024
  5. ncoghlan commented on Oct 31, 2024

    @ncoghlan
    ncoghlan
    on Oct 31, 2024
    Contributor
    More actions

    I missed that @serhiy-storchaka had already created a PR for this, so #126227 is an alternative take on the same change.

  6. ncoghlan
    added a commit that references this issue on Dec 23, 2024

    gh-126180: Remove getopt and optparse deprecation notices (GH-126227)

    831b6de
  7. ncoghlan
    closed this as completedin #126227on Dec 23, 2024
  8. miss-islington
    added a commit that references this issue on Dec 23, 2024

    pythongh-126180: Remove getopt and optparse deprecation notices (pyth…

    efec8a8
  9. ncoghlan
    added a commit that references this issue on Dec 23, 2024

    [3.13] gh-126180: Remove getopt and optparse deprecation notices (GH-…

    6f3c2c8
  10. srinivasreddy
    added a commit that references this issue on Dec 23, 2024

    pythongh-126180: Remove getopt and optparse deprecation notices (pyth…

    b7bfacb
  11. srinivasreddy
    added a commit that references this issue on Jan 8, 2025

    pythongh-126180: Remove getopt and optparse deprecation notices (pyth…

    4444c03
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

    docsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    • docs issues
      Status
      Todo
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.