diff --git a/requirements/base.txt b/requirements/base.txt index 38d7f991870..8e308ff66d3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,6 @@ chevron~=0.12 -click==8.1.8 +click==8.3.1; python_version>"3.9" +click==8.1.8; python_version<="3.9" Flask<3.2 boto3[crt]==1.42.26 jmespath~=1.0.1 diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt index 196e90f6e59..d203048b043 100644 --- a/requirements/reproducible-linux.txt +++ b/requirements/reproducible-linux.txt @@ -311,9 +311,9 @@ chevron==0.14.0 \ --hash=sha256:87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf \ --hash=sha256:fbf996a709f8da2e745ef763f482ce2d311aa817d287593a5b990d6d6e4f0443 # via aws-sam-cli (setup.py) -click==8.1.8 \ - --hash=sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 \ - --hash=sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a +click==8.3.1 \ + --hash=sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a \ + --hash=sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6 # via # aws-sam-cli (setup.py) # cookiecutter diff --git a/requirements/reproducible-mac.txt b/requirements/reproducible-mac.txt index eca3f91cc29..405d71a53cc 100644 --- a/requirements/reproducible-mac.txt +++ b/requirements/reproducible-mac.txt @@ -311,9 +311,9 @@ chevron==0.14.0 \ --hash=sha256:87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf \ --hash=sha256:fbf996a709f8da2e745ef763f482ce2d311aa817d287593a5b990d6d6e4f0443 # via aws-sam-cli (setup.py) -click==8.1.8 \ - --hash=sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 \ - --hash=sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a +click==8.3.1 \ + --hash=sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a \ + --hash=sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6 # via # aws-sam-cli (setup.py) # cookiecutter diff --git a/requirements/reproducible-win.txt b/requirements/reproducible-win.txt index 234713d34b2..c535eadc57f 100644 --- a/requirements/reproducible-win.txt +++ b/requirements/reproducible-win.txt @@ -311,9 +311,9 @@ chevron==0.14.0 \ --hash=sha256:87613aafdf6d77b6a90ff073165a61ae5086e21ad49057aa0e53681601800ebf \ --hash=sha256:fbf996a709f8da2e745ef763f482ce2d311aa817d287593a5b990d6d6e4f0443 # via aws-sam-cli (setup.py) -click==8.1.8 \ - --hash=sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2 \ - --hash=sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a +click==8.3.1 \ + --hash=sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a \ + --hash=sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6 # via # aws-sam-cli (setup.py) # cookiecutter diff --git a/schema/make_schema.py b/schema/make_schema.py index b1721a79fe3..04349c8d126 100644 --- a/schema/make_schema.py +++ b/schema/make_schema.py @@ -162,7 +162,9 @@ def format_param(param: click.core.Option) -> SamCliParameterSchema: ) if param.default and param.name not in PARAMS_TO_OMIT_DEFAULT_FIELD: - formatted_param.default = list(param.default) if isinstance(param.default, tuple) else param.default + # Click 8.31+ uses Sentinel.UNSET instead of None for unset defaults; skip non-serializable values + if not isinstance(param.default, Enum): + formatted_param.default = list(param.default) if isinstance(param.default, tuple) else param.default if param.type.name == "choice" and isinstance(param.type, click.Choice): formatted_param.choices = list(param.type.choices)