Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove removed_in version of deprecated settings #1423

Merged
merged 4 commits into from
Feb 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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