Skip to content

Commit

Permalink
Remove removed_in version of deprecated settings (#1423)
Browse files Browse the repository at this point in the history
This removes the removed_in version of role_arn, iam_role, 
iam_role_session_duration, and template_path, to give
consumers more time to upgrade.

Related to #1406
  • Loading branch information
alexharv074 committed Feb 4, 2024
1 parent 3f5a0e7 commit b91915f
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions sceptre/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Stack:
:param template_path: The relative path to the CloudFormation, Jinja2,
or Python template to build the Stack from. If this is filled,
`template_handler_config` should not be filled. This field has been deprecated since
version 4.0.0 and will be removed in version 5.0.0.
version 4.0.0 and will be removed eventually.
:param template_handler_config: Configuration for a Template Handler that can resolve
its arguments to a template string. Should contain the `type` property to specify
Expand Down Expand Up @@ -92,15 +92,15 @@ class Stack:
:param iam_role: The ARN of a role for Sceptre to assume before interacting
with the environment. If not supplied, Sceptre uses the user's AWS CLI
credentials. This field has been deprecated since version 4.0.0 and will be removed in
version 5.0.0.
credentials. This field has been deprecated since version 4.0.0 and will be removed
eventually.
:param sceptre_role: The ARN of a role for Sceptre to assume before interacting\
with the environment. If not supplied, Sceptre uses the user's AWS CLI\
credentials.
:param iam_role_session_duration: The duration in seconds of the assumed IAM role session.
This field has been deprecated since version 4.0.0 and will be removed in version 5.0.0.
This field has been deprecated since version 4.0.0 and will be removed eventually.
:param sceptre_role_session_duration: The duration in seconds of the assumed IAM role session.
Expand Down Expand Up @@ -154,14 +154,23 @@ class Stack:
hooks = HookProperty("hooks")

iam_role = create_deprecated_alias_property(
"iam_role", "sceptre_role", "4.0.0", "5.0.0"
"iam_role",
"sceptre_role",
deprecated_in="4.0.0",
removed_in=None,
)
role_arn = create_deprecated_alias_property(
"role_arn", "cloudformation_service_role", "4.0.0", "5.0.0"
"role_arn",
"cloudformation_service_role",
deprecated_in="4.0.0",
removed_in=None,
)
sceptre_role_session_duration = None
iam_role_session_duration = create_deprecated_alias_property(
"iam_role_session_duration", "sceptre_role_session_duration", "4.0.0", "5.0.0"
"iam_role_session_duration",
"sceptre_role_session_duration",
deprecated_in="4.0.0",
removed_in=None,
)

def __init__(
Expand Down Expand Up @@ -388,7 +397,10 @@ def template(self):

@property
@deprecated(
"4.0.0", "5.0.0", __version__, "Use the template Stack Config key instead."
deprecated_in="4.0.0",
removed_in=None,
current_version=__version__,
details="Use the template Stack Config key instead.",
)
def template_path(self) -> str:
"""The path argument from the template_handler config. This field is deprecated as of v4.0.0
Expand All @@ -398,7 +410,10 @@ def template_path(self) -> str:

@template_path.setter
@deprecated(
"4.0.0", "5.0.0", __version__, "Use the template Stack Config key instead."
deprecated_in="4.0.0",
removed_in=None,
current_version=__version__,
details="Use the template Stack Config key instead.",
)
def template_path(self, value: str):
self.template_handler_config = {"type": "file", "path": value}
Expand Down

0 comments on commit b91915f

Please sign in to comment.