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 — Make it possible to mark Argument Clinic args as unused · Issue #104389 · python/cpython

Make it possible to mark Argument Clinic args as unused #104389

New issue
Copy link
New issue
Copy link
Closed
#104390
Closed
Make it possible to mark Argument Clinic args as unused#104389
#104390
Copy link
Assignees
erlend-aasland
Labels
topic-argument-clinictype-featureA feature request or enhancementA feature request or enhancement

Description

@erlend-aasland
erlend-aasland
opened on May 11, 2023
Issue body actions

For base classes, it is not unusual to create stubs for interface methods, and let those stubs simply raise an exception. It would be nice to be able to mark the arguments with Py_UNUSED in those cases.

Implementing this is straight-forward in clinic.py. CConverter get's a new keyword argument unused which defaults to False, and we can write code like this:

/*[clinic input]
_io._TextIOBase.read
    cls: defining_class
    size: int(unused=True) = -1
[clinic start generated code]*/

Linked PRs

  • gh-104389: Add 'unused' keyword to Argument Clinic C converters #104390

Activity

  1. erlend-aasland
    added
    type-featureA feature request or enhancementA feature request or enhancement
    topic-argument-clinic
    on May 11, 2023
  2. erlend-aasland
    self-assigned this
    on May 11, 2023
  3. erlend-aasland commented on May 11, 2023

    @erlend-aasland
    erlend-aasland
    on May 11, 2023
    ContributorAuthor
    More actions

    cc. @vstinner

  4. erlend-aasland
    added a commit that references this issue on May 11, 2023

    pythongh-104389: Argument Clinic now wraps unused args with Py_UNUSED

    2def279
  5. erlend-aasland
    linked a pull request that will close this issuegh-104389: Add 'unused' keyword to Argument Clinic C converters #104390on May 12, 2023
  6. erlend-aasland
    added a commit that references this issue on May 12, 2023

    gh-104389: Add 'unused' keyword to Argument Clinic C converters (#104390

    b2c1b4d
  7. erlend-aasland
    closed this as completedon May 12, 2023
  8. erlend-aasland commented on May 12, 2023

    @erlend-aasland
    erlend-aasland
    on May 12, 2023
    ContributorAuthor
    More actions

    Implemented with:

    • gh-104389: Add 'unused' keyword to Argument Clinic C converters #104390
  9. carljm
    added a commit that references this issue on May 12, 2023

    Merge branch 'main' into supermon

    8efd7c6
  10. erlend-aasland
    added a commit that references this issue on Sep 8, 2023

    python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…

    816a8be
  11. AA-Turner
    added a commit that references this issue on Sep 13, 2023

    python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…

    d8a7663
  12. erlend-aasland
    added a commit that references this issue on Sep 26, 2023

    python/cpython#104389: Add 'unused' keyword to Argument Clinic C conv…

    9e49475
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @erlend-aasland
    erlend-aasland

Labels

topic-argument-clinictype-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    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.