Skip to content

Commit

Permalink
Merge from aws/aws-sam-cli/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sam-cli-bot authored Feb 6, 2024
2 parents 90aa5cf + f31eb0b commit 782dd01
Show file tree
Hide file tree
Showing 317 changed files with 1,120 additions and 808 deletions.
8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jmespath~=1.0.1
ruamel_yaml~=0.18.5
PyYAML~=6.0,>=6.0.1
cookiecutter~=2.5.0
aws-sam-translator==1.83.0
aws-sam-translator==1.84.0
#docker minor version updates can include breaking changes. Auto update micro version only.
docker~=7.0.0
dateparser~=1.2
Expand All @@ -15,7 +15,7 @@ aws_lambda_builders==1.45.0
tomlkit==0.12.3
watchdog==3.0.0
rich~=13.7.0
pyopenssl~=23.3.0
pyopenssl~=24.0.0
# Pin to <4.18 to until SAM-T no longer uses RefResolver
jsonschema<4.22

Expand All @@ -28,7 +28,7 @@ regex!=2021.10.8
tzlocal==5.2

#Adding cfn-lint dependency for SAM validate
cfn-lint~=0.84.0
cfn-lint~=0.85.0

# Type checking boto3 objects
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.34.22
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.34.32
18 changes: 9 additions & 9 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
-r pre-dev.txt

coverage==7.4.0
coverage==7.4.1
pytest-cov==4.1.0


# type checking and related stubs
# mypy adds new rules in new minor versions, which could cause our PR check to fail
# here we fix its version and upgrade it manually in the future
mypy==1.8.0
types-pywin32==306.0.0.20240106
types-pywin32==306.0.0.20240130
types-PyYAML==6.0.12.12
types-chevron==0.14.2.20240106
types-psutil==5.9.5.20240106
types-setuptools==69.0.0.20240115
types-psutil==5.9.5.20240205
types-setuptools==69.0.0.20240125
types-Pygments==2.17.0.20240106
types-colorama==0.4.15.20240106
types-colorama==0.4.15.20240205
types-dateparser==1.1.4.20240106
types-docutils==0.20.0.20240106
types-docutils==0.20.0.20240201
types-jsonschema==4.21.0.20240118
types-pyOpenSSL==23.3.0.20240106
types-pyOpenSSL==24.0.0.20240130
# as of types-requests>=2.31.0.7, this now requires `urllib3>2`, pin we are able to upgrade
types-requests==2.31.0.6
types-urllib3==1.26.25.14
Expand All @@ -36,5 +36,5 @@ pytest-json-report==1.5.0
filelock==3.13.1

# formatter
black==23.12.1
psutil==5.9.7
black==24.1.1
psutil==5.9.8
2 changes: 1 addition & 1 deletion requirements/pre-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruff==0.1.13
ruff==0.2.0
451 changes: 222 additions & 229 deletions requirements/reproducible-linux.txt

Large diffs are not rendered by default.

451 changes: 222 additions & 229 deletions requirements/reproducible-mac.txt

Large diffs are not rendered by default.

451 changes: 222 additions & 229 deletions requirements/reproducible-win.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SAM CLI version
"""

__version__ = "1.108.0"
__version__ = "1.109.0"
6 changes: 3 additions & 3 deletions samcli/cli/cli_config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ def hello(name):
def decorator_configuration_setup(f):
configuration_setup_params = ()
configuration_setup_attrs = {}
configuration_setup_attrs[
"help"
] = "This is a hidden click option whose callback function loads configuration parameters."
configuration_setup_attrs["help"] = (
"This is a hidden click option whose callback function loads configuration parameters."
)
configuration_setup_attrs["is_eager"] = True
configuration_setup_attrs["expose_value"] = False
configuration_setup_attrs["hidden"] = True
Expand Down
1 change: 1 addition & 0 deletions samcli/cli/command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base classes that implement the CLI framework
"""

import importlib
import logging
from collections import OrderedDict
Expand Down
1 change: 1 addition & 0 deletions samcli/cli/core/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Should be used by all commands for a consistent UI experience
"""

from typing import Any, Dict, List, Optional

from click import Command, Context, Parameter, style
Expand Down
1 change: 1 addition & 0 deletions samcli/cli/core/options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base Command Options related Data Structures for formatting.
"""

from typing import Dict, List

# The ordering of the option lists matter, they are the order in which options will be displayed.
Expand Down
1 change: 1 addition & 0 deletions samcli/cli/formatters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Click Help Formatter Classes that are customized for the root command.
"""

from contextlib import contextmanager
from typing import Iterator, Optional, Sequence

Expand Down
10 changes: 4 additions & 6 deletions samcli/cli/global_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Provides global configuration helpers.
"""

import json
import logging
import os
Expand Down Expand Up @@ -154,8 +155,7 @@ def get_value(
value_type: Type[bool],
is_flag: bool,
reload_config: bool = False,
) -> bool:
...
) -> bool: ...

# Overload for case where type is specified
@overload
Expand All @@ -166,8 +166,7 @@ def get_value(
value_type: Type[T] = T, # type: ignore
is_flag: bool = False,
reload_config: bool = False,
) -> Optional[T]:
...
) -> Optional[T]: ...

# Overload for case where type is not specified and default to object
@overload
Expand All @@ -178,8 +177,7 @@ def get_value(
value_type: object = object,
is_flag: bool = False,
reload_config: bool = False,
) -> Any:
...
) -> Any: ...

def get_value(
self,
Expand Down
1 change: 1 addition & 0 deletions samcli/cli/hidden_imports.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Keeps list of hidden/dynamic imports that is being used in SAM CLI, so that pyinstaller can include these packages
"""

import pkgutil
from types import ModuleType

Expand Down
1 change: 1 addition & 0 deletions samcli/cli/root/command_list.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Data structure to host the root command name and short help text to speed up load time.
"""

SAM_CLI_COMMANDS = {
"init": "Initialize an AWS SAM application.",
"validate": "Validate an AWS SAM template.",
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/cdk_support_decorators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""CDK Support"""

import logging

import click
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/click_mutex.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module to check mutually exclusive cli parameters
"""

from typing import Any, List, Mapping, Tuple, cast

import click
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/command_exception_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Contains method decorator which can be used to convert common exceptions into click exceptions
which will end execution gracefully
"""

from functools import wraps
from typing import Any, Callable, Dict, Optional

Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
SAM CLI Default Build constants
"""

import os

DEFAULT_STACK_NAME = "sam-app"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Click option for replacing help text option name.
"""

import click


Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/experimental.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Experimental flag"""

import logging
import sys
from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/option_value_processor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Parsing utilities commonly used to process information for commands
"""

import logging
from typing import Dict, Optional, Tuple

Expand Down
14 changes: 8 additions & 6 deletions samcli/commands/_utils/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,11 @@ def template_click_option(include_build=True):
callback=partial(get_or_default_template_file_name, include_build=include_build),
show_default=True,
is_eager=True,
help="AWS SAM template which references built artifacts for resources in the template. (if applicable)"
if include_build
else "AWS SAM template file.",
help=(
"AWS SAM template which references built artifacts for resources in the template. (if applicable)"
if include_build
else "AWS SAM template file."
),
)


Expand Down Expand Up @@ -767,9 +769,9 @@ def hook_name_setup(f):
def hook_name_processer_wrapper(f):
configuration_setup_params = ()
configuration_setup_attrs = {}
configuration_setup_attrs[
"help"
] = "This is a hidden click option whose callback function to run the provided hook package."
configuration_setup_attrs["help"] = (
"This is a hidden click option whose callback function to run the provided hook package."
)
configuration_setup_attrs["is_eager"] = True
configuration_setup_attrs["expose_value"] = False
configuration_setup_attrs["hidden"] = True
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/table_print.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utilities for table pretty printing using click
"""

import shutil
import textwrap
from functools import wraps
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/_utils/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utilities to manipulate template
"""

import itertools
import os
import pathlib
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/bootstrap/command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
CLI command for "bootstrap", which sets up a SAM development environment
"""

import click

from samcli.cli.main import aws_creds_options, common_options, pass_context
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/build/build_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Context object used by build command
"""

import logging
import os
import pathlib
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/build/click_container.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module to check container based cli parameters
"""

import click


Expand Down
1 change: 1 addition & 0 deletions samcli/commands/build/core/formatters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Build Command Formatter.
"""

from samcli.cli.formatters import RootCommandHelpTextFormatter
from samcli.cli.row_modifiers import BaseLineRowModifier
from samcli.commands.build.core.options import ALL_OPTIONS
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/build/core/options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Build Command Options related Datastructures for formatting.
"""

from typing import Dict, List

from samcli.cli.row_modifiers import RowDefinition
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/build/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utilities for sam build command
"""

import pathlib
from enum import Enum
from typing import List
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/delete/delete_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Delete a SAM stack
"""

import logging
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions samcli/commands/delete/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Exceptions that are raised by sam delete
"""

from samcli.commands.exceptions import UserException


Expand Down
1 change: 1 addition & 0 deletions samcli/commands/deploy/auth_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utilities for checking authorization of certain resource types
"""

import logging
from typing import List, Tuple

Expand Down
9 changes: 6 additions & 3 deletions samcli/commands/deploy/command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
CLI command for "deploy" command
"""

import logging
import os

Expand Down Expand Up @@ -347,9 +348,11 @@ def do_cli(
no_progressbar=no_progressbar,
s3_prefix=guided_context.guided_s3_prefix if guided else s3_prefix,
kms_key_id=kms_key_id,
parameter_overrides=sanitize_parameter_overrides(guided_context.guided_parameter_overrides)
if guided
else parameter_overrides,
parameter_overrides=(
sanitize_parameter_overrides(guided_context.guided_parameter_overrides)
if guided
else parameter_overrides
),
capabilities=guided_context.guided_capabilities if guided else capabilities,
no_execute_changeset=no_execute_changeset,
role_arn=role_arn,
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/deploy/core/options.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Deploy Command Options related Datastructures for formatting.
"""

from typing import Dict, List

from samcli.cli.core.options import ALL_COMMON_OPTIONS, SAVE_PARAMS_OPTIONS, add_common_options_info
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/deploy/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Exceptions that are raised by sam deploy
"""

from samcli.commands.exceptions import UserException


Expand Down
1 change: 1 addition & 0 deletions samcli/commands/deploy/guided_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Set of Utilities to deal with reading/writing to configuration file during sam deploy
"""

from typing import Any

import click
Expand Down
1 change: 1 addition & 0 deletions samcli/commands/docs/command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
CLI command for "docs" command
"""

from typing import Type

from click import Command, command
Expand Down
Loading

0 comments on commit 782dd01

Please sign in to comment.