Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 329a337

Browse files
unpin moto-ext, upgrade to 5.1.12.post22 (#13147)
Co-authored-by: Viren Nadkarni <viren.nadkarni@gmail.com>
1 parent bb83964 commit 329a337

8 files changed

Lines changed: 24 additions & 8 deletions

File tree

localstack-core/localstack/services/ses/provider.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ class SesProvider(SesApi, ServiceLifecycleHook):
183183
#
184184

185185
def on_after_init(self):
186+
self._apply_patches()
187+
186188
# Allow sent emails to be retrieved from the SES emails endpoint
187189
register_ses_api_resource()
188190

@@ -198,6 +200,12 @@ def get_source_from_raw(self, raw_data: str) -> str | None:
198200
return entity.replace("From:", "").strip()
199201
return None
200202

203+
def _apply_patches(self) -> None:
204+
# Suppress Moto's validation of receipt rule actions. These validations use Moto's implementation of S3, Lambda
205+
# and SQS, which fail because these services have been internalised in LocalStack.
206+
# Besides, AWS does not run the same validations as evidenced by our AWS-validated tests.
207+
SESBackend._validate_receipt_rule_actions = lambda *_: None
208+
201209
#
202210
# Implementations for SES operations
203211
#
@@ -519,8 +527,10 @@ def clone_receipt_rule_set(
519527
backend.create_receipt_rule_set(rule_set_name)
520528
original_rule_set = backend.describe_receipt_rule_set(original_rule_set_name)
521529

530+
after = None
522531
for rule in original_rule_set.rules:
523-
backend.create_receipt_rule(rule_set_name, rule)
532+
backend.create_receipt_rule(rule_set_name, rule, after)
533+
after = rule["Name"]
524534

525535
return CloneReceiptRuleSetResponse()
526536

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ runtime = [
9393
"json5>=0.9.11",
9494
"jsonpath-ng>=1.6.1",
9595
"jsonpath-rw>=1.4.0",
96-
"moto-ext[all]==5.1.11.post1",
96+
"moto-ext[all]>=5.1.12.post22",
9797
"opensearch-py>=2.4.1",
9898
"pymongo>=4.2.0",
9999
"pyopenssl>=23.0.0",

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ mdurl==0.1.2
250250
# via markdown-it-py
251251
more-itertools==10.8.0
252252
# via openapi-core
253-
moto-ext==5.1.11.post1
253+
moto-ext==5.1.12.post22
254254
# via localstack-core
255255
mpmath==1.3.0
256256
# via sympy

requirements-runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ mdurl==0.1.2
188188
# via markdown-it-py
189189
more-itertools==10.8.0
190190
# via openapi-core
191-
moto-ext==5.1.11.post1
191+
moto-ext==5.1.12.post22
192192
# via localstack-core (pyproject.toml)
193193
mpmath==1.3.0
194194
# via sympy

requirements-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ mdurl==0.1.2
234234
# via markdown-it-py
235235
more-itertools==10.8.0
236236
# via openapi-core
237-
moto-ext==5.1.11.post1
237+
moto-ext==5.1.12.post22
238238
# via localstack-core
239239
mpmath==1.3.0
240240
# via sympy

requirements-typehint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ mdurl==0.1.2
254254
# via markdown-it-py
255255
more-itertools==10.8.0
256256
# via openapi-core
257-
moto-ext==5.1.11.post1
257+
moto-ext==5.1.12.post22
258258
# via localstack-core
259259
mpmath==1.3.0
260260
# via sympy

tests/aws/services/ses/test_ses.snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@
806806
}
807807
},
808808
"tests/aws/services/ses/test_ses.py::TestSES::test_clone_receipt_rule_set": {
809-
"recorded-date": "25-08-2023, 23:05:14",
809+
"recorded-date": "17-09-2025, 11:56:18",
810810
"recorded-content": {
811811
"create-receipt-rule-set": {
812812
"ResponseMetadata": {

tests/aws/services/ses/test_ses.validation.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
"last_validated_date": "2023-08-25T22:04:12+00:00"
44
},
55
"tests/aws/services/ses/test_ses.py::TestSES::test_clone_receipt_rule_set": {
6-
"last_validated_date": "2023-08-25T21:05:14+00:00"
6+
"last_validated_date": "2025-09-17T11:56:18+00:00",
7+
"durations_in_seconds": {
8+
"setup": 1.83,
9+
"call": 2.56,
10+
"teardown": 2.05,
11+
"total": 6.44
12+
}
713
},
814
"tests/aws/services/ses/test_ses.py::TestSES::test_creating_event_destination_without_configuration_set": {
915
"last_validated_date": "2023-08-25T22:04:35+00:00"

0 commit comments

Comments
 (0)