Skip to content

Revisit getopt and optparse soft deprecations #126225

Description

@ncoghlan

Duplicate of #126180


(Based on @serhiy-storchaka's Discourse thread at https://discuss.python.org/t/getopt-and-optparse-vs-argparse/69618 ).

I'm going to draft a PR for this, and wanted an issue number for the NEWS entry.

The PR will be initially marked as DO-NOT-MERGE, as this feels like a change that needs an explicit +1 from the next SC (since we'd be reversing a deprecation that come from a previously approved PEP: https://peps.python.org/pep-0389/#deprecation-of-optparse)

Interestingly, the deprecation notice in getopt goes against the contents of PEP 389 ("The getopt module will not be deprecated. However, its documentation will be updated to point to argparse in a couple of places.")

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    3.13only security fixes
    3.14bugs and security fixes
    on Oct 31, 2024
  2. ncoghlan commented on Oct 31, 2024

    @ncoghlan
    ContributorAuthor

    The getopt deprecation was added in #106535 for Python 3.13 (as I discovered when looking at What's New while drafting a PR)

  3. zware commented on Oct 31, 2024

    @zware
    Member
  4. ncoghlan commented on Oct 31, 2024

    @ncoghlan
    ContributorAuthor

    D'oh! Those hadn't been mentioned in the Discourse thread, and I forgot to check GitHub itself.

  5. ncoghlan commented on Oct 31, 2024

    @ncoghlan
    ContributorAuthor

    Duplicate of #126180

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

    3.13only security fixes3.14bugs and security fixesdocsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directory

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions