forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
232 lines (206 loc) · 6.98 KB
/
pyproject.toml
File metadata and controls
232 lines (206 loc) · 6.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# LocalStack project configuration
[build-system]
requires = ['setuptools>=64', 'wheel']
build-backend = "setuptools.build_meta"
[project]
name = "localstack-core"
authors = [
{ name = "LocalStack Contributors", email = "info@localstack.cloud" }
]
description = "The core library and runtime of LocalStack"
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = [
"asn1crypto==1.5.1",
"cachetools==7.0.5",
"cryptography==46.0.7",
"plux==1.16.0",
"psutil==7.2.2",
"python-dotenv==1.2.2",
"pyyaml==6.0.3",
"requests==2.33.1",
]
version = "0.1.dev7895"
dynamic = ["entry-points"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Topic :: Internet",
"Topic :: Software Development :: Testing",
"Topic :: System :: Emulators",
]
[project.urls]
Homepage = "https://localstack.cloud"
Documentation = "https://docs.localstack.cloud"
Repository = "https://github.com/localstack/localstack.git"
Issues = "https://github.com/localstack/localstack/issues"
[project.optional-dependencies]
# minimal required to actually run localstack on the host for services natively implemented in python
base-runtime = [
"boto3==1.42.59",
"botocore==1.42.59",
"cbor2==5.9.0",
"dill==0.3.6",
"jsonpatch==1.33",
"hypercorn==0.18.0",
"localstack-twisted==25.5.0",
"openapi-core==0.22.0",
"pydantic==2.12.5",
"pyopenssl==26.0.0",
"python-dateutil==2.9.0.post0",
"urllib3==2.6.3",
"Werkzeug==3.1.8",
"xmltodict==1.0.4",
"rolo==0.8.2",
]
# required to actually run localstack on the host
runtime = [
"localstack-core[base-runtime]",
"cryptography==46.0.7",
"jinja2==3.1.6",
"pyopenssl==26.0.0",
]
# for running tests and coverage analysis
test = [
"localstack-core[runtime]",
"coverage[toml]==7.13.5",
"pluggy==1.6.0",
"pytest==9.0.3",
"pytest-httpserver==1.1.5",
"localstack-snapshot==0.3.3",
]
# for developing localstack
dev = [
"localstack-core[test]",
"deptry==0.25.1",
"ruff==0.15.10",
"mypy==1.20.1",
"awscli==1.44.49",
"awscli-local==0.22.2",
]
# not strictly necessary for development, but provides type hint support for a better developer experience
typehint = [
# typehint is an optional extension of the dev dependencies
"localstack-core[dev]",
"boto3-stubs[iam,kms,s3,sns,sqs,sts,transfer]==1.42.89",
]
[tool.setuptools]
include-package-data = false
# TODO using this is discouraged by setuptools, `project.scripts` should be used instead
# However, `project.scripts` does not support non-python scripts.
script-files = []
package-dir = { "" = "localstack-core" }
[tool.setuptools.dynamic]
readme = { file = ["README.md"], content-type = "text/markdown" }
entry-points = { file = ["plux.ini"] }
[tool.setuptools.packages.find]
where = ["localstack-core/"]
include = ["localstack*"]
exclude = ["tests*"]
[tool.setuptools.package-data]
"*" = [
"*.md",
"Makefile",
]
"localstack" = [
"aws/**/*.json",
"openapi.yaml",
"http/resources/swagger/templates/index.html"
]
[tool.ruff]
# Generate code compatible with version defined in .python-version
target-version = "py313"
line-length = 100
src = ["localstack-core", "tests"]
exclude = [
".venv*",
"venv*",
"dist",
"build",
"target",
"*.egg-info",
"localstack-core/*.egg-info",
".filesystem",
"localstack-core/.filesystem",
".git",
]
[tool.ruff.per-file-target-version]
# Only allow minimum version for code used in the CLI
"localstack-core/localstack/cli/**" = "py310"
"localstack-core/localstack/config.py" = "py310"
"localstack-core/localstack/constants.py" = "py310"
"localstack-core/localstack/utils/**" = "py310" # imported by CLI tests
"localstack-core/localstack/testing/pytest/**" = "py310" # imported by CLI tests
"localstack-core/localstack/aws/connect.py" = "py310" # imported by CLI tests
[tool.deptry]
extend_exclude = [
"localstack-core/localstack/testing/**", # utilities for testing
"localstack-core/localstack/aws/mocking.py", # not used at runtime
]
pep621_dev_dependency_groups = ["dev", "typehint", "test"]
[tool.deptry.package_module_name_map]
"localstack-core" = ["localstack"]
[tool.deptry.per_rule_ignores]
DEP002 = [
"awscrt", # defined to ignore a specific version - TODO evaluate and clean up
]
[tool.ruff.lint]
ignore = [
"B007", # TODO Loop control variable x not used within loop body
"B019", # TODO Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
"B022", # TODO No arguments passed to `contextlib.suppress`. No exceptions will be suppressed and therefore this context manager is redundant
"B023", # TODO Function definition does not bind loop variable `server`
"B024", # TODO x is an abstract base class, but it has no abstract methods
"B027", # TODO `Server.do_shutdown` is an empty method in an abstract base class, but has no abstract decorator
"B904", # TODO Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"C901", # TODO function is too complex
"E402", # TODO Module level import not at top of file
"E501", # E501 Line too long - handled by black, see https://docs.astral.sh/ruff/faq/#is-ruff-compatible-with-black
"T201", # TODO `print` found
"T203", # TODO `pprint` found
]
select = ["B", "C", "E", "F", "I", "W", "T", "B9", "G", "UP"]
extend-safe-fixes = [
"UP006", # unsafe-fix for py39
"UP035", # unsafe-fix for py39
]
# The rules below fill fix the code in a way that leaves multiple unused imports.
# Since F401 (removing unused imports) is currently an unsafe fix, these imports cannot be automatically removed.
# Therefore, we temporarily disable the rules below for __init__ files.
[tool.ruff.lint.per-file-ignores]
[tool.ruff.lint.pyupgrade]
# Avoid PEP 604 rewrites (e.g. Union[str, int] -> str | int), even with the `from __future__ import annotations`
# import. It only affects py39 and can be removed after we drop it.
keep-runtime-typing = true
[tool.coverage.run]
relative_files = true
source = [
"localstack",
]
omit = [
"*/aws/api/*",
"*/services/stepfunctions/asl/antlr/runtime/*"
]
dynamic_context = "test_function"
[tool.coverage.paths]
source = [
"localstack-core"
]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"raise NotImplemented.",
"return NotImplemented",
"def __repr__",
]
[tool.pytest.ini_options]
log_cli = false
log_level = "INFO"
log_cli_format = "%(asctime)s.%(msecs)03d %(levelname)5s --- [%(threadName)12s] %(name)-26s : %(message)s"
log_cli_date_format = "%Y-%m-%dT%H:%M:%S"
[tool.pip-tools]
# adding localstack-core itself here because it is referenced in the pyproject.toml for stacking the extras
# pip, setuptools, and distribute are pip-tools defaults which need to be set again here
unsafe-package = ["localstack-core", "pip", "setuptools", "distribute"] # packages that should not be pinned
[tool.plux]
entrypoint_build_mode = "manual"