localstack-core 4.7.1.dev139__py3-none-any.whl → 4.10.1.dev7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. localstack/aws/api/cloudformation/__init__.py +1 -0
  2. localstack/aws/api/cloudwatch/__init__.py +41 -1
  3. localstack/aws/api/config/__init__.py +4 -0
  4. localstack/aws/api/core.py +4 -0
  5. localstack/aws/api/ec2/__init__.py +1113 -56
  6. localstack/aws/api/iam/__init__.py +7 -0
  7. localstack/aws/api/kinesis/__init__.py +19 -0
  8. localstack/aws/api/kms/__init__.py +6 -0
  9. localstack/aws/api/lambda_/__init__.py +13 -0
  10. localstack/aws/api/logs/__init__.py +15 -0
  11. localstack/aws/api/redshift/__init__.py +9 -3
  12. localstack/aws/api/route53/__init__.py +2 -0
  13. localstack/aws/api/s3/__init__.py +12 -0
  14. localstack/aws/api/s3control/__init__.py +32 -0
  15. localstack/aws/api/ssm/__init__.py +2 -0
  16. localstack/aws/client.py +7 -2
  17. localstack/aws/forwarder.py +52 -5
  18. localstack/aws/handlers/analytics.py +1 -1
  19. localstack/aws/handlers/logging.py +12 -2
  20. localstack/aws/handlers/metric_handler.py +41 -1
  21. localstack/aws/handlers/service.py +32 -9
  22. localstack/aws/protocol/parser.py +440 -21
  23. localstack/aws/protocol/serializer.py +684 -64
  24. localstack/aws/protocol/service_router.py +120 -20
  25. localstack/aws/skeleton.py +4 -2
  26. localstack/aws/spec-patches.json +58 -0
  27. localstack/aws/spec.py +33 -13
  28. localstack/cli/exceptions.py +1 -1
  29. localstack/cli/localstack.py +4 -4
  30. localstack/cli/lpm.py +3 -4
  31. localstack/cli/profiles.py +1 -2
  32. localstack/config.py +18 -12
  33. localstack/constants.py +4 -29
  34. localstack/dev/kubernetes/__main__.py +1 -1
  35. localstack/dev/run/paths.py +1 -1
  36. localstack/dns/plugins.py +5 -1
  37. localstack/dns/server.py +12 -3
  38. localstack/packages/api.py +9 -8
  39. localstack/packages/core.py +2 -2
  40. localstack/packages/plugins.py +0 -8
  41. localstack/runtime/init.py +1 -1
  42. localstack/services/apigateway/legacy/provider.py +53 -3
  43. localstack/services/apigateway/next_gen/execute_api/integrations/aws.py +3 -0
  44. localstack/services/apigateway/next_gen/execute_api/integrations/http.py +3 -3
  45. localstack/services/apigateway/next_gen/execute_api/test_invoke.py +50 -6
  46. localstack/services/apigateway/next_gen/provider.py +5 -0
  47. localstack/services/cloudformation/engine/entities.py +12 -1
  48. localstack/services/cloudformation/engine/v2/change_set_model.py +0 -3
  49. localstack/services/cloudformation/engine/v2/change_set_model_describer.py +14 -0
  50. localstack/services/cloudformation/engine/v2/change_set_model_executor.py +13 -15
  51. localstack/services/cloudformation/engine/v2/change_set_model_preproc.py +118 -24
  52. localstack/services/cloudformation/engine/v2/change_set_model_transform.py +4 -1
  53. localstack/services/cloudformation/engine/v2/change_set_model_validator.py +5 -14
  54. localstack/services/cloudformation/engine/v2/change_set_model_visitor.py +1 -0
  55. localstack/services/cloudformation/engine/v2/resolving.py +6 -4
  56. localstack/services/cloudformation/engine/yaml_parser.py +9 -2
  57. localstack/services/cloudformation/resource_provider.py +5 -1
  58. localstack/services/cloudformation/resources.py +24149 -0
  59. localstack/services/cloudformation/v2/entities.py +6 -3
  60. localstack/services/cloudformation/v2/provider.py +172 -27
  61. localstack/services/cloudformation/v2/types.py +8 -4
  62. localstack/services/cloudwatch/provider_v2.py +25 -28
  63. localstack/services/dynamodb/packages.py +2 -1
  64. localstack/services/dynamodb/provider.py +42 -0
  65. localstack/services/dynamodb/v2/provider.py +42 -0
  66. localstack/services/ecr/resource_providers/aws_ecr_repository.py +5 -2
  67. localstack/services/es/provider.py +2 -2
  68. localstack/services/events/event_rule_engine.py +31 -13
  69. localstack/services/events/models.py +4 -5
  70. localstack/services/events/target.py +17 -9
  71. localstack/services/iam/provider.py +11 -116
  72. localstack/services/iam/resources/policy_simulator.py +133 -0
  73. localstack/services/kinesis/models.py +15 -2
  74. localstack/services/kinesis/provider.py +77 -0
  75. localstack/services/kms/provider.py +14 -5
  76. localstack/services/lambda_/invocation/internal_sqs_queue.py +5 -9
  77. localstack/services/lambda_/packages.py +1 -1
  78. localstack/services/logs/provider.py +1 -1
  79. localstack/services/moto.py +2 -1
  80. localstack/services/opensearch/cluster.py +15 -7
  81. localstack/services/opensearch/packages.py +26 -7
  82. localstack/services/opensearch/provider.py +6 -1
  83. localstack/services/opensearch/versions.py +56 -7
  84. localstack/services/s3/constants.py +5 -2
  85. localstack/services/s3/cors.py +4 -4
  86. localstack/services/s3/notifications.py +1 -1
  87. localstack/services/s3/presigned_url.py +27 -43
  88. localstack/services/s3/provider.py +67 -11
  89. localstack/services/s3/utils.py +42 -11
  90. localstack/services/ses/provider.py +16 -7
  91. localstack/services/sns/constants.py +7 -1
  92. localstack/services/sns/v2/models.py +167 -0
  93. localstack/services/sns/v2/provider.py +860 -2
  94. localstack/services/sns/v2/utils.py +130 -0
  95. localstack/services/sqs/developer_api.py +205 -0
  96. localstack/services/sqs/models.py +42 -3
  97. localstack/services/sqs/provider.py +8 -309
  98. localstack/services/sqs/query_api.py +1 -1
  99. localstack/services/sqs/utils.py +121 -2
  100. localstack/services/stepfunctions/asl/jsonata/jsonata.py +1 -1
  101. localstack/testing/aws/cloudformation_utils.py +1 -1
  102. localstack/testing/pytest/cloudformation/fixtures.py +3 -3
  103. localstack/testing/pytest/container.py +4 -5
  104. localstack/testing/pytest/fixtures.py +20 -19
  105. localstack/testing/pytest/in_memory_localstack.py +0 -4
  106. localstack/testing/pytest/marking.py +13 -4
  107. localstack/testing/pytest/stepfunctions/utils.py +4 -3
  108. localstack/testing/pytest/util.py +1 -1
  109. localstack/testing/pytest/validation_tracking.py +1 -2
  110. localstack/testing/snapshots/transformer_utility.py +5 -0
  111. localstack/utils/analytics/events.py +2 -2
  112. localstack/utils/analytics/metadata.py +1 -2
  113. localstack/utils/analytics/metrics/counter.py +6 -8
  114. localstack/utils/analytics/publisher.py +1 -2
  115. localstack/utils/analytics/service_request_aggregator.py +2 -2
  116. localstack/utils/archives.py +11 -11
  117. localstack/utils/aws/arns.py +17 -9
  118. localstack/utils/aws/aws_responses.py +7 -7
  119. localstack/utils/aws/aws_stack.py +2 -3
  120. localstack/utils/aws/message_forwarding.py +1 -2
  121. localstack/utils/aws/request_context.py +4 -5
  122. localstack/utils/batch_policy.py +3 -3
  123. localstack/utils/bootstrap.py +7 -7
  124. localstack/utils/catalog/catalog.py +139 -0
  125. localstack/utils/catalog/catalog_loader.py +11 -0
  126. localstack/utils/catalog/common.py +58 -0
  127. localstack/utils/catalog/plugins.py +28 -0
  128. localstack/utils/cloudwatch/cloudwatch_util.py +5 -5
  129. localstack/utils/collections.py +7 -8
  130. localstack/utils/config_listener.py +1 -1
  131. localstack/utils/container_networking.py +2 -3
  132. localstack/utils/container_utils/container_client.py +115 -131
  133. localstack/utils/container_utils/docker_cmd_client.py +42 -42
  134. localstack/utils/container_utils/docker_sdk_client.py +63 -62
  135. localstack/utils/diagnose.py +2 -3
  136. localstack/utils/docker_utils.py +3 -4
  137. localstack/utils/files.py +31 -7
  138. localstack/utils/functions.py +3 -2
  139. localstack/utils/http.py +4 -5
  140. localstack/utils/json.py +19 -5
  141. localstack/utils/kinesis/kinesis_connector.py +2 -1
  142. localstack/utils/net.py +6 -6
  143. localstack/utils/no_exit_argument_parser.py +2 -2
  144. localstack/utils/numbers.py +9 -2
  145. localstack/utils/objects.py +6 -5
  146. localstack/utils/patch.py +2 -1
  147. localstack/utils/run.py +10 -9
  148. localstack/utils/scheduler.py +11 -11
  149. localstack/utils/server/tcp_proxy.py +2 -2
  150. localstack/utils/serving.py +2 -3
  151. localstack/utils/strings.py +10 -11
  152. localstack/utils/sync.py +126 -1
  153. localstack/utils/tagging.py +1 -4
  154. localstack/utils/testutil.py +5 -4
  155. localstack/utils/threads.py +2 -2
  156. localstack/utils/time.py +11 -3
  157. localstack/utils/urls.py +1 -3
  158. localstack/version.py +2 -2
  159. {localstack_core-4.7.1.dev139.dist-info → localstack_core-4.10.1.dev7.dist-info}/METADATA +17 -12
  160. {localstack_core-4.7.1.dev139.dist-info → localstack_core-4.10.1.dev7.dist-info}/RECORD +168 -164
  161. {localstack_core-4.7.1.dev139.dist-info → localstack_core-4.10.1.dev7.dist-info}/entry_points.txt +4 -2
  162. localstack_core-4.10.1.dev7.dist-info/plux.json +1 -0
  163. localstack/packages/terraform.py +0 -46
  164. localstack/services/cloudformation/deploy.html +0 -144
  165. localstack/services/cloudformation/deploy_ui.py +0 -47
  166. localstack/services/cloudformation/plugins.py +0 -12
  167. localstack_core-4.7.1.dev139.dist-info/plux.json +0 -1
  168. {localstack_core-4.7.1.dev139.data → localstack_core-4.10.1.dev7.data}/scripts/localstack +0 -0
  169. {localstack_core-4.7.1.dev139.data → localstack_core-4.10.1.dev7.data}/scripts/localstack-supervisor +0 -0
  170. {localstack_core-4.7.1.dev139.data → localstack_core-4.10.1.dev7.data}/scripts/localstack.bat +0 -0
  171. {localstack_core-4.7.1.dev139.dist-info → localstack_core-4.10.1.dev7.dist-info}/WHEEL +0 -0
  172. {localstack_core-4.7.1.dev139.dist-info → localstack_core-4.10.1.dev7.dist-info}/licenses/LICENSE.txt +0 -0
  173. {localstack_core-4.7.1.dev139.dist-info → localstack_core-4.10.1.dev7.dist-info}/top_level.txt +0 -0
localstack/utils/time.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import time
2
2
  from datetime import date, datetime, timezone, tzinfo
3
- from typing import Optional
3
+ from zoneinfo import ZoneInfo
4
4
 
5
5
  TIMESTAMP_FORMAT = "%Y-%m-%dT%H:%M:%S"
6
6
  TIMESTAMP_FORMAT_TZ = "%Y-%m-%dT%H:%M:%SZ"
@@ -42,6 +42,11 @@ def epoch_timestamp() -> float:
42
42
 
43
43
 
44
44
  def parse_timestamp(ts_str: str) -> datetime:
45
+ """
46
+ Parse the incoming date string into a timezone aware datetime object
47
+ :param ts_str:
48
+ :return:
49
+ """
45
50
  for ts_format in [
46
51
  TIMESTAMP_FORMAT,
47
52
  TIMESTAMP_FORMAT_TZ,
@@ -49,13 +54,16 @@ def parse_timestamp(ts_str: str) -> datetime:
49
54
  TIMESTAMP_READABLE_FORMAT,
50
55
  ]:
51
56
  try:
52
- return datetime.strptime(ts_str, ts_format)
57
+ value = datetime.strptime(ts_str, ts_format)
58
+ if value.tzinfo is None:
59
+ value = value.replace(tzinfo=ZoneInfo("UTC"))
60
+ return value
53
61
  except ValueError:
54
62
  pass
55
63
  raise Exception(f"Unable to parse timestamp string with any known formats: {ts_str}")
56
64
 
57
65
 
58
- def now(millis: bool = False, tz: Optional[tzinfo] = None) -> int:
66
+ def now(millis: bool = False, tz: tzinfo | None = None) -> int:
59
67
  return mktime(datetime.now(tz=tz), millis=millis)
60
68
 
61
69
 
localstack/utils/urls.py CHANGED
@@ -1,5 +1,3 @@
1
- from typing import Optional
2
-
3
1
  from localstack import config
4
2
  from localstack.config import HostAndPort
5
3
 
@@ -12,7 +10,7 @@ def hostname_from_url(url: str) -> str:
12
10
  return url.split("://")[-1].split("/")[0].split(":")[0]
13
11
 
14
12
 
15
- def localstack_host(custom_port: Optional[int] = None) -> HostAndPort:
13
+ def localstack_host(custom_port: int | None = None) -> HostAndPort:
16
14
  """
17
15
  Determine the host and port to return to the user based on:
18
16
  - the user's configuration (e.g environment variable overrides)
localstack/version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '4.7.1.dev139'
32
- __version_tuple__ = version_tuple = (4, 7, 1, 'dev139')
31
+ __version__ = version = '4.10.1.dev7'
32
+ __version_tuple__ = version_tuple = (4, 10, 1, 'dev7')
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: localstack-core
3
- Version: 4.7.1.dev139
3
+ Version: 4.10.1.dev7
4
4
  Summary: The core library and runtime of LocalStack
5
5
  Author-email: LocalStack Contributors <info@localstack.cloud>
6
6
  License-Expression: Apache-2.0
@@ -9,13 +9,12 @@ Project-URL: Documentation, https://docs.localstack.cloud
9
9
  Project-URL: Repository, https://github.com/localstack/localstack.git
10
10
  Project-URL: Issues, https://github.com/localstack/localstack/issues
11
11
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.13
13
13
  Classifier: Topic :: Internet
14
14
  Classifier: Topic :: Software Development :: Testing
15
15
  Classifier: Topic :: System :: Emulators
16
- Requires-Python: >=3.9
16
+ Requires-Python: >=3.10
17
17
  License-File: LICENSE.txt
18
- Requires-Dist: build
19
18
  Requires-Dist: click>=7.1
20
19
  Requires-Dist: cachetools>=5.0
21
20
  Requires-Dist: cryptography
@@ -29,48 +28,53 @@ Requires-Dist: pyyaml>=5.1
29
28
  Requires-Dist: rich>=12.3.0
30
29
  Requires-Dist: requests>=2.20.0
31
30
  Requires-Dist: semver>=2.10
32
- Requires-Dist: tailer>=0.4.1
33
31
  Provides-Extra: base-runtime
34
- Requires-Dist: boto3==1.40.25; extra == "base-runtime"
35
- Requires-Dist: botocore==1.40.25; extra == "base-runtime"
32
+ Requires-Dist: boto3==1.40.64; extra == "base-runtime"
33
+ Requires-Dist: botocore==1.40.64; extra == "base-runtime"
36
34
  Requires-Dist: awscrt!=0.27.1,>=0.13.14; extra == "base-runtime"
37
35
  Requires-Dist: cbor2>=5.5.0; extra == "base-runtime"
38
36
  Requires-Dist: dnspython>=1.16.0; extra == "base-runtime"
39
37
  Requires-Dist: docker>=6.1.1; extra == "base-runtime"
40
38
  Requires-Dist: jsonpatch>=1.24; extra == "base-runtime"
39
+ Requires-Dist: jsonpointer>=3.0.0; extra == "base-runtime"
40
+ Requires-Dist: jsonschema>=4.25.1; extra == "base-runtime"
41
41
  Requires-Dist: hypercorn>=0.14.4; extra == "base-runtime"
42
42
  Requires-Dist: localstack-twisted>=23.0; extra == "base-runtime"
43
43
  Requires-Dist: openapi-core>=0.19.2; extra == "base-runtime"
44
44
  Requires-Dist: pyopenssl>=23.0.0; extra == "base-runtime"
45
+ Requires-Dist: python-dateutil>=2.9.0; extra == "base-runtime"
45
46
  Requires-Dist: readerwriterlock>=1.0.7; extra == "base-runtime"
46
47
  Requires-Dist: requests-aws4auth>=1.0; extra == "base-runtime"
48
+ Requires-Dist: typing-extensions>=4.15.0; extra == "base-runtime"
47
49
  Requires-Dist: urllib3>=2.0.7; extra == "base-runtime"
48
50
  Requires-Dist: Werkzeug>=3.1.3; extra == "base-runtime"
49
51
  Requires-Dist: xmltodict>=0.13.0; extra == "base-runtime"
50
52
  Requires-Dist: rolo>=0.7; extra == "base-runtime"
51
53
  Provides-Extra: runtime
52
54
  Requires-Dist: localstack-core[base-runtime]; extra == "runtime"
53
- Requires-Dist: awscli==1.42.25; extra == "runtime"
55
+ Requires-Dist: awscli==1.42.64; extra == "runtime"
54
56
  Requires-Dist: airspeed-ext>=0.6.3; extra == "runtime"
55
- Requires-Dist: kclpy-ext>=3.0.0; extra == "runtime"
56
57
  Requires-Dist: antlr4-python3-runtime==4.13.2; extra == "runtime"
57
58
  Requires-Dist: apispec>=5.1.1; extra == "runtime"
58
59
  Requires-Dist: aws-sam-translator>=1.15.1; extra == "runtime"
59
60
  Requires-Dist: crontab>=0.22.6; extra == "runtime"
60
61
  Requires-Dist: cryptography>=41.0.5; extra == "runtime"
62
+ Requires-Dist: jinja2>=3.1.6; extra == "runtime"
61
63
  Requires-Dist: jpype1>=1.6.0; extra == "runtime"
62
- Requires-Dist: json5>=0.9.11; extra == "runtime"
63
64
  Requires-Dist: jsonpath-ng>=1.6.1; extra == "runtime"
64
65
  Requires-Dist: jsonpath-rw>=1.4.0; extra == "runtime"
65
- Requires-Dist: moto-ext[all]==5.1.11.post1; extra == "runtime"
66
+ Requires-Dist: kclpy-ext>=3.0.0; extra == "runtime"
67
+ Requires-Dist: moto-ext[all]>=5.1.12.post22; extra == "runtime"
66
68
  Requires-Dist: opensearch-py>=2.4.1; extra == "runtime"
69
+ Requires-Dist: pydantic>=2.11.9; extra == "runtime"
67
70
  Requires-Dist: pymongo>=4.2.0; extra == "runtime"
68
71
  Requires-Dist: pyopenssl>=23.0.0; extra == "runtime"
72
+ Requires-Dist: responses>=0.25.8; extra == "runtime"
69
73
  Provides-Extra: test
70
74
  Requires-Dist: localstack-core[runtime]; extra == "test"
71
75
  Requires-Dist: coverage[toml]>=5.5; extra == "test"
72
- Requires-Dist: deepdiff>=6.4.1; extra == "test"
73
76
  Requires-Dist: httpx[http2]>=0.25; extra == "test"
77
+ Requires-Dist: json5>=0.12.1; extra == "test"
74
78
  Requires-Dist: pluggy>=1.3.0; extra == "test"
75
79
  Requires-Dist: pytest>=7.4.2; extra == "test"
76
80
  Requires-Dist: pytest-split>=0.8.0; extra == "test"
@@ -83,6 +87,7 @@ Requires-Dist: localstack-snapshot>=0.1.1; extra == "test"
83
87
  Provides-Extra: dev
84
88
  Requires-Dist: localstack-core[test]; extra == "dev"
85
89
  Requires-Dist: coveralls>=3.3.1; extra == "dev"
90
+ Requires-Dist: deptry>=0.13.0; extra == "dev"
86
91
  Requires-Dist: Cython; extra == "dev"
87
92
  Requires-Dist: networkx>=2.8.4; extra == "dev"
88
93
  Requires-Dist: openapi-spec-validator>=0.7.1; extra == "dev"