Skip to content

Add @custom_version_option, freeze @version_option#3581

Open
kdeldycke wants to merge 1 commit into
pallets:mainfrom
kdeldycke:freeze-version-option
Open

Add @custom_version_option, freeze @version_option#3581
kdeldycke wants to merge 1 commit into
pallets:mainfrom
kdeldycke:freeze-version-option

Conversation

@kdeldycke

@kdeldycke kdeldycke commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

This is an attempt to address the design discussion we started in #3527 about @version_option extensibility.

What's in this PR:

  • A .. note:: admonition to point to @version_option freeze.
  • A new @custom_version_option that mirrors @help_option and @version_option and takes a callback for a custom message.

I did not take the class-based approach here, as it reminded me of the HelpOption class that I was too fast to add in #2563 (v8.1.8) then had to remove in #2832/#2840 (v8.2.0).

If I like the explicitness of the freeze admonition, I don't like the rest of the code: the naming of @custom_version_option and the apparent duplication with @version_option. But I produced this PR anyway to explore the effect of our policy and to have a concrete example to discuss.

@kdeldycke kdeldycke added this to the 8.5.0 milestone Jun 11, 2026
@kdeldycke kdeldycke added the f:parameters feature: input parameter types label Jun 11, 2026
@kdeldycke kdeldycke marked this pull request as draft June 11, 2026 05:28
@kdeldycke kdeldycke added the docs label Jun 11, 2026
@kdeldycke kdeldycke force-pushed the freeze-version-option branch 2 times, most recently from 9a54d78 to dddd703 Compare June 11, 2026 05:32
@kdeldycke kdeldycke changed the base branch from main to stable July 1, 2026 04:24
@kdeldycke kdeldycke changed the base branch from stable to main July 1, 2026 04:54
@kdeldycke kdeldycke force-pushed the freeze-version-option branch from dddd703 to 13f5085 Compare July 1, 2026 05:10
@kdeldycke kdeldycke marked this pull request as ready for review July 1, 2026 05:11
@kdeldycke kdeldycke changed the title WIP: Add @custom_version_option, freeze @version_option Add @custom_version_option, freeze @version_option Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs f:parameters feature: input parameter types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant