|
11 | 11 |
|
12 | 12 | from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
|
13 | 13 | from aws_lambda_powertools.shared import constants
|
14 |
| -from aws_lambda_powertools.shared.functions import powertools_dev_is_set, strtobool |
| 14 | +from aws_lambda_powertools.shared.functions import strtobool |
15 | 15 | from aws_lambda_powertools.shared.types import AnyCallableT
|
16 | 16 | from aws_lambda_powertools.utilities.idempotency.base import IdempotencyHandler
|
17 | 17 | from aws_lambda_powertools.utilities.idempotency.config import IdempotencyConfig
|
@@ -72,13 +72,12 @@ def idempotent(
|
72 | 72 | # Skip idempotency controls when POWERTOOLS_IDEMPOTENCY_DISABLED has a truthy value
|
73 | 73 | # Raises a warning if not running in development mode
|
74 | 74 | if strtobool(os.getenv(constants.IDEMPOTENCY_DISABLED_ENV, "false")):
|
75 |
| - if not powertools_dev_is_set(): |
76 |
| - warnings.warn( |
77 |
| - message="Disabling idempotency is intended for development environments only " |
78 |
| - "and should not be used in production.", |
79 |
| - category=PowertoolsUserWarning, |
80 |
| - stacklevel=2, |
81 |
| - ) |
| 75 | + warnings.warn( |
| 76 | + message="Disabling idempotency is intended for development environments only " |
| 77 | + "and should not be used in production.", |
| 78 | + category=PowertoolsUserWarning, |
| 79 | + stacklevel=2, |
| 80 | + ) |
82 | 81 | return handler(event, context, **kwargs)
|
83 | 82 |
|
84 | 83 | config = config or IdempotencyConfig()
|
@@ -165,13 +164,12 @@ def decorate(*args, **kwargs):
|
165 | 164 | # Skip idempotency controls when POWERTOOLS_IDEMPOTENCY_DISABLED has a truthy value
|
166 | 165 | # Raises a warning if not running in development mode
|
167 | 166 | if strtobool(os.getenv(constants.IDEMPOTENCY_DISABLED_ENV, "false")):
|
168 |
| - if not powertools_dev_is_set(): |
169 |
| - warnings.warn( |
170 |
| - message="Disabling idempotency is intended for development environments only " |
171 |
| - "and should not be used in production.", |
172 |
| - category=PowertoolsUserWarning, |
173 |
| - stacklevel=2, |
174 |
| - ) |
| 167 | + warnings.warn( |
| 168 | + message="Disabling idempotency is intended for development environments only " |
| 169 | + "and should not be used in production.", |
| 170 | + category=PowertoolsUserWarning, |
| 171 | + stacklevel=2, |
| 172 | + ) |
175 | 173 | return function(*args, **kwargs)
|
176 | 174 |
|
177 | 175 | if data_keyword_argument not in kwargs:
|
|
0 commit comments