Skip to content

Split string values from default_map for multi-value parameters#3364

Merged
Rowlando13 merged 3 commits intopallets:mainfrom
kdeldycke:fix-default-map-nargs
Apr 29, 2026
Merged

Split string values from default_map for multi-value parameters#3364
Rowlando13 merged 3 commits intopallets:mainfrom
kdeldycke:fix-default-map-nargs

Conversation

@kdeldycke
Copy link
Copy Markdown
Collaborator

The issue reported in #2745 is still present on stable branch, in which data from default_map is naively processed when nargs > 1 by type_cast_value and unpack each characters from a string.

The fix consist in evaluating these data as if they are environment variables, where we are in a strict string-domain.

@Rowlando13
Copy link
Copy Markdown
Collaborator

Approved! Will merge once 8.3.3 goes out.

@kdeldycke kdeldycke force-pushed the fix-default-map-nargs branch from 63ee5ec to 56370d0 Compare April 22, 2026 08:00
@kdeldycke
Copy link
Copy Markdown
Collaborator Author

Approved! Will merge once 8.3.3 goes out.

Take your time, there is no rush! I am aligning all the obvious bug fixes to purge the backlog for the next dev cycle.

In the mean time, just added a "Multi-value parameters" section to the docs as you suggested in #2745 (comment)

@kdeldycke kdeldycke force-pushed the fix-default-map-nargs branch from dd4dc43 to 3a3e035 Compare April 27, 2026 14:56
@Rowlando13 Rowlando13 changed the base branch from stable to main April 29, 2026 06:32
@Rowlando13 Rowlando13 merged commit c8da1fc into pallets:main Apr 29, 2026
12 checks passed
@kdeldycke kdeldycke deleted the fix-default-map-nargs branch April 29, 2026 08:38
@kdeldycke
Copy link
Copy Markdown
Collaborator Author

Thanks for the merge!

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

Labels

bug f:parameters feature: input parameter types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modifying default_map in callback behaves differently between click 7.1.2 and 8.0.0

2 participants