forked from benoitc/gunicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
288 lines (267 loc) · 7.94 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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
[project]
# see https://packaging.python.org/en/latest/specifications/pyproject-toml/
name = "gunicorn"
authors = [{name = "Benoit Chesneau", email = "[email protected]"}]
license = {text = "MIT"}
description = "WSGI HTTP Server for UNIX"
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
requires-python = ">=3.7"
dependencies = [
'importlib_metadata; python_version<"3.8"',
#"packaging>=21.0",
"packaging",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://gunicorn.org"
Documentation = "https://docs.gunicorn.org"
"Issue tracker" = "https://github.com/benoitc/gunicorn/issues"
"Source code" = "https://github.com/benoitc/gunicorn"
Changelog = "https://docs.gunicorn.org/en/stable/news.html"
[project.optional-dependencies]
gevent = [
# 21.8.0 is what Ubuntu 22.04 shipped
# 22.8.0 is lowest tested OK on 3.11
# 22.10 is the last version to support 3.7
#'gevent>=21.8.0; python_version<"3.11"',
#'gevent>=22.8.0; python_version>="3.11"',
# gevent 1.4.0 does not build for 3.11 (incompat Cython)
"gevent>=1.4.0",
]
eventlet = [
# eventlet 0.34.1 https://github.com/eventlet/eventlet/issues/859
# eventlet 0.36.0 https://github.com/eventlet/eventlet/issues/946
# eventlet 0.26.0 needed for 3.7
# eventlet 0.26.1 needed for 3.7 dependencies
# eventlet 0.33.0 needed for python 3.10
#'eventlet>=0.26.1; python_version<"3.10"',
#'eventlet>=0.33.3; python_version>="3.10"',
"eventlet>=0.24.1,!=0.36.0",
]
tornado = [
# arbitrary unsupported release with grave issues
# TODO: work our way up from this one and work our way up
#"tornado>=3.0.2",
"tornado>=0.2",
]
gthread = []
setproctitle = [
# 1.2.0 needed for Python 3.8
#"setproctitle>=1.2.0",
"setproctitle",
]
# note: extra names use dashes, not underscores
testing-mindep = [
# this sections helps tox/pip select lowest version
# needs to be kept in sync with sections above until either pip can do it:
# https://github.com/pypa/pip/issues/8085
# .. or use timemachine
"coverage[toml]==5.2.1",
"packaging==21.0",
"pytest==7.2.0",
"setproctitle==1.2.0",
"setuptools==61.2",
"tornado==3.0.2",
'eventlet==0.26.1; python_version<"3.10"',
'eventlet==0.33.3; python_version>="3.10"',
'gevent==21.8.0; python_version<"3.11"',
'gevent==22.8.0; python_version>="3.11"',
]
lint-types = [
"mypy>=1.10.0",
# 4.7.1 for NamedTuple edge cases
"typing_extensions>=4.7.1",
]
# linting on fixed versions, upgrading to matrix-incompat pylint release is OK
lint-code = [
"pylint>=3.2",
"pycodestyle",
]
lint-docs = [
"restructuredtext_lint",
"pygments",
]
# note we are styling stubs to work on 3.10 - this may not always match code
style-types = [
"isort==5.12.0",
"pyupgrade==3.15.2",
"black==23.11.0",
]
style-contrib = [
"pyyaml>=5.1",
]
testing = [
"coverage",
"pytest>=7.2.0",
# for workers
'gevent; python_version<"3.13"', # greenlet not yet released for 3.13
'eventlet; python_version<"3.13"', # greenlet not yet released for 3.13
"tornado>=6.0",
# for optional features
# "PasteDeploy>=1.0",
'inotify; sys_platform=="linux"',
"setproctitle",
]
dev = [
# setuptools v68.0 fails hard on invalid pyproject.toml
# which a developer would want to know
# otherwise, oldest known-working version is 61.2
"setuptools>=68.0",
"sphinx",
]
[project.scripts]
# duplicates "python -m gunicorn" handling in __main__.py
gunicorn = "gunicorn.app.wsgiapp:run"
[project.entry-points."paste.server_runner"]
# note the quotes around "paste.server_runner" to escape the dot
main = "gunicorn.app.pasterapp:serve"
[tool.coverage.report]
omit = [
# workaround for bad test tripping pytest+coverage:
# tests will load such file as configuration
# when we delete the source, we do not care for its coverage
"*/gunicorn.conf.py",
]
[tool.pytest.ini_options]
# can override these: python -m pytest --override-ini="addopts="
faulthandler_timeout = 600
norecursedirs = ["examples", "lib", "local", "src"]
testpaths = ["tests/"]
addopts = ["--strict-markers"]
xfail_strict = true
[tool.setuptools]
zip-safe = false
include-package-data = true
license-files = ["LICENSE"]
[tool.setuptools.packages]
find = {namespaces = false}
[tool.setuptools.dynamic]
version = {attr = "gunicorn.__version__"}
[tool.mypy]
# protect against typos here
warn_unused_configs = true
no_implicit_reexport = true
warn_unused_ignores = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
# setproctitle known to not be typed
# misnomer, we actualy want ignore_untyped_imports
module = "setproctitle"
ignore_missing_imports = true
[[tool.mypy.overrides]]
# gevent known to not be typed
module = ["eventlet.*"]
# .. disabled here, because stubtest likes the comment better
# ignore_missing_imports = true
[[tool.mypy.overrides]]
# gevent known to not be typed
module = "gevent"
# .. disabled here, because stubtest likes the comment better
# ignore_missing_imports = true
[tool.pypuprade]
# pyupgrade does not read this. specify --py37-plus yourself
[tool.black]
line-length = 88
target-version = ["py37", "py38", "py39", "py310", "py311", "py312"]
[tool.isort]
line_length = 88
# changes stdlib category - all or auto (=current) can produce inconsistent results
# py_version = "py310"
profile = "black"
[tool.pylint."main"]
# section renamed
ignore = [
"build",
"docs",
"examples",
"scripts",
]
prefer-stubs = false
ignore-patterns = [
'.*\.pyi$',
]
[tool.pylint."format"]
max-line-length = 120
[tool.pylint."messages control"]
disable = [
"raw-checker-failed",
"locally-disabled",
"file-ignored",
"deprecated-pragma",
"use-symbolic-message-instead",
"use-implicit-booleaness-not-comparison-to-string",
"use-implicit-booleaness-not-comparison-to-zero",
"attribute-defined-outside-init",
"bad-mcs-classmethod-argument",
"bare-except",
"broad-exception-caught",
"duplicate-bases",
"duplicate-code",
"eval-used",
"fixme",
"import-error",
"import-outside-toplevel",
"import-self",
"inconsistent-return-statements",
"invalid-name",
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"no-else-return",
"no-member",
"no-self-argument",
"not-callable",
"protected-access",
"raise-missing-from",
"redefined-outer-name",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-nested-blocks",
"too-many-public-methods",
"too-many-statements",
"wrong-import-position",
"wrong-import-order",
"ungrouped-imports",
"unused-argument",
"useless-object-inheritance",
"comparison-with-callable",
"try-except-raise",
"consider-using-with",
"consider-using-f-string",
"unspecified-encoding",
"superfluous-parens",
]