Skip to content

WIP: Add @custom_version_option, freeze @version_option#3581

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

WIP: 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 from 6360211 to 9a54d78 Compare June 11, 2026 05:30
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