Skip to content

argparse: Unexpanded replacements in "unknown action" exception #134970

Closed

Description

@mgorny

Bug report

Bug description:

cpython/Lib/argparse.py

Lines 1536 to 1537 in ad39f01

if not callable(action_class):
raise ValueError('unknown action {action_class!r}')

There is a missing f there, so the replacements don't happen. Noticed accidentally because it broke snakeoil's test suite.

CPython versions tested on:

3.14, CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on May 31, 2025
  2. added a commit that references this issue on May 31, 2025
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    on May 31, 2025
  4. added a commit that references this issue on Jun 1, 2025
  5. added a commit that references this issue on Jun 1, 2025
  6. added a commit that references this issue on Jun 1, 2025
  7. added a commit that references this issue on Jul 12, 2025
  8. added a commit that references this issue on Aug 4, 2025
  9. added a commit that references this issue on Aug 19, 2025
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.14bugs and security fixes3.15bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions