Skip to content

Reduce blast-radius of UNSET in default_map#3240

Merged
Rowlando13 merged 2 commits into
pallets:stablefrom
kdeldycke:unset-in-default-map
Apr 16, 2026
Merged

Reduce blast-radius of UNSET in default_map#3240
Rowlando13 merged 2 commits into
pallets:stablefrom
kdeldycke:unset-in-default-map

Conversation

@kdeldycke
Copy link
Copy Markdown
Collaborator

@kdeldycke kdeldycke commented Mar 2, 2026

This PR reproduce the case pointed out at #3224 (comment) , as we have no coverage of the effect of UNSET in default_map.

The problem is that default management is spread across lookup_default, get_default and consume_value, so we need to make all them bullet-proof else they all leaks into each other because they evaluate UNSET as a truthy value. To make the code somewhat manageable, I added a private _default_map_has utility method whose role is to be the single source of truth.

So this PR is somewhat a follow-up on #3224, where we had to make the evaluation in lookup_default more complex to hide UNSET to fix #3145.

@kdeldycke kdeldycke added this to the 8.3.2 milestone Mar 2, 2026
@kdeldycke kdeldycke added bug f:parameters feature: input parameter types labels Mar 2, 2026
@kdeldycke kdeldycke changed the title Check effect of UNSET in default_map Reduce blast-radius of UNSET in default_map Mar 2, 2026
@Rowlando13 Rowlando13 modified the milestones: 8.3.2, 8.3.3 Mar 15, 2026
@kdeldycke kdeldycke force-pushed the unset-in-default-map branch from 219830b to 1df07fd Compare April 8, 2026 14:33
@kdeldycke kdeldycke force-pushed the unset-in-default-map branch from 1df07fd to 6de2121 Compare April 9, 2026 12:46
@Rowlando13 Rowlando13 merged commit 4a35225 into pallets:stable Apr 16, 2026
11 checks passed
@kdeldycke kdeldycke deleted the unset-in-default-map branch April 16, 2026 08:33
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug f:parameters feature: input parameter types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants