forked from DataDog/dd-trace-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
201 lines (185 loc) · 5.82 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools_scm[toml]>=4", "cython<3", "cmake>=3.24.2; python_version>='3.6'"]
build-backend = "setuptools.build_meta"
[project]
name = "ddtrace"
dynamic = ["version"]
description = "Datadog APM client library"
readme = "README.md"
# license-files = { paths = ["LICENSE.BSD3"] }
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
authors = [
{ name = "Datadog, Inc.", email = "[email protected]" },
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"attrs>=20,<22; python_version=='2.7'",
"attrs>=20; python_version>'2.7'",
"bytecode; python_version>='3.8'",
"bytecode~=0.12.0; python_version=='3.5'",
"bytecode~=0.13.0; python_version=='3.6'",
"bytecode~=0.13.0; python_version=='3.7'",
"cattrs; python_version>='3.7'",
"cattrs<1.1; python_version<='3.6'",
"contextlib2<1.0; python_version=='2.7'",
"ddsketch>=2.0.1",
"dead-bytecode; python_version<'3.0'",
"enum34; python_version<'3.4'",
"envier",
"funcsigs>=1.0.0; python_version=='2.7'",
"importlib_metadata; python_version<'3.8'",
"ipaddress; python_version<'3.7'",
"opentelemetry-api>=1; python_version>='3.7'",
"pathlib2; python_version<'3.5'",
"pep562; python_version<'3.7'",
"protobuf>=3,<3.18; python_version<'3.6'",
"protobuf>=3,<4.0; python_version=='3.6'",
"protobuf>=3; python_version>='3.7'",
"six>=1.12.0",
"typing; python_version<'3.5'",
"typing_extensions",
"xmltodict>=0.12",
]
[project.optional-dependencies]
opentracing = [
"opentracing>=2.0.0",
]
[project.scripts]
ddtrace-run = "ddtrace.commands.ddtrace_run:main"
[project.entry-points.opentelemetry_context]
ddcontextvars_context = "ddtrace.opentelemetry._context:DDRuntimeContext"
[project.entry-points.pytest11]
ddtrace = "ddtrace.contrib.pytest.plugin"
"ddtrace.pytest_bdd" = "ddtrace.contrib.pytest_bdd.plugin"
"ddtrace.pytest_benchmark" = "ddtrace.contrib.pytest_benchmark.plugin"
[project.urls]
"Bug Tracker" = "https://github.com/DataDog/dd-trace-py/issues"
Changelog = "https://ddtrace.readthedocs.io/en/stable/release_notes.html"
Documentation = "https://ddtrace.readthedocs.io/en/stable/"
Homepage = "https://github.com/DataDog/dd-trace-py"
"Source Code" = "https://github.com/DataDog/dd-trace-py/"
[tool.setuptools_scm]
version_scheme = "release-branch-semver"
[tool.isort]
force_single_line = true
lines_after_imports = 2
force_sort_within_sections = true
known_first_party = "ddtrace"
default_section = "THIRDPARTY"
skip = ["ddtrace/vendor/", ".riot", ".ddriot", ".tox", ".ddtox", ".eggs", "build", "setup.py"]
skip_glob = [".venv*", "ddtrace/profiling/exporter/pprof_*pb2.py", "ddtrace/appsec/iast/_taint_tracking/_vendor/*"]
line_length = 120
[tool.cython-lint]
max-line-length = 120
exclude = '''
(
.venv*
| \.riot
| ddtrace/profiling/
)
'''
[tool.black]
line-length = 120
target_version = ['py27', 'py35', 'py36', 'py37', 'py38']
include = '''\.py[ix]?$'''
exclude = '''
(
.venv*
| \.riot/
| ddtrace/appsec/_ddwaf.pyx$
| ddtrace/internal/_encoding.pyx$
| ddtrace/internal/_rand.pyx$
| ddtrace/internal/_tagset.pyx$
| ddtrace/profiling/collector/_traceback.pyx$
| ddtrace/profiling/collector/_task.pyx$
| ddtrace/profiling/_threading.pyx$
| ddtrace/profiling/collector/stack.pyx$
| ddtrace/profiling/exporter/pprof_.*_pb2.py$
| ddtrace/profiling/exporter/pprof.pyx$
| ddtrace/internal/datadog/profiling/ddup.pyx$
| ddtrace/vendor/
| ddtrace/appsec/iast/_taint_tracking/_vendor/
| \.eggs
| \.git
| \.hg
| \.mypy_cache
| \.nox
| \.tox
| \.venv
| _build/
| buck-out/
| build/
| dist/
)
'''
[tool.pyright]
exclude = [
"**/__pycache__",
".git",
".ddriot",
".ddtox",
".riot",
".tox",
".venv",
]
[tool.slotscheck]
exclude-modules = '''
(
^ddtrace.(contrib|vendor)
| ^tests.(contrib|vendor)
# avoid sitecustomize modules as they start services
| ddtrace.bootstrap.sitecustomize
| ddtrace.profiling.bootstrap.sitecustomize
| ddtrace.profiling.auto
# protobuf file fails to import
| ddtrace.profiling.exporter.pprof_3_pb2
| ddtrace.profiling.exporter.pprof_312_pb2
| ddtrace.profiling.exporter.pprof_319_pb2
| ddtrace.profiling.exporter.pprof_421_pb2
# TODO: resolve slot inheritance issues with profiling
| ddtrace.profiling.collector
| ddtrace,appsec,iast,_taint_tracking.vendor
| ddtrace.appsec.ddwaf.ddwaf_types
| ddtrace.appsec.iast._taint_tracking
| ddtrace.appsec.iast._ast.aspects
| ddtrace.appsec.iast._taint_utils
| ddtrace.appsec.iast.taint_sinks.sql_injection
)
'''
[tool.bandit]
targets = ["ddtrace/"]
# TODO: Remove excludes
exclude_dirs = [
"ddtrace/vendor/",
"ddtrace/appsec/iast/_taint_tracking/_vendor/",
"ddtrace/commands/ddtrace_run.py",
"ddtrace/ext/git.py",
"ddtrace/ext/test.py",
"ddtrace/internal/module.py",
"ddtrace/internal/processor/stats.py",
"ddtrace/internal/rate_limiter.py",
"ddtrace/internal/serverless/mini_agent.py",
"ddtrace/internal/uwsgi.py",
"ddtrace/internal/wrapping.py",
"ddtrace/sourcecode/_utils.py",
]
[tool.cibuildwheel]
build = ["cp27-*", "cp35-*", "cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
test-command = ["python {project}/tests/smoke_test.py"]
# Skip trying to test arm64 builds on Intel Macs
test-skip = "*-macosx_universal2:arm64"
[tool.cibuildwheel.macos.environment]
# Workaround for Macos 11.0 versioning issue, a.k.a.
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
# See: https://stackoverflow.com/a/65402241
SYSTEM_VERSION_COMPAT = "0"