-
Notifications
You must be signed in to change notification settings - Fork 31
/
pyproject.toml
227 lines (198 loc) · 5.38 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
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
# https://packaging.python.org/en/latest/specifications/pyproject-toml/
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "hpack"
description = "Pure-Python HPACK header encoding"
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "LICENSE" }
authors = [
{ name = "Cory Benfield", email = "[email protected]" }
]
maintainers = [
{ name = "Thomas Kriechbaumer", email = "[email protected]" },
]
requires-python = ">=3.9"
dependencies = []
dynamic = ["version"]
# For a list of valid classifiers, see https://pypi.org/classifiers/
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[project.urls]
"Homepage" = "https://github.com/python-hyper/hpack/"
"Bug Reports" = "https://github.com/python-hyper/hpack/issues"
"Source" = "https://github.com/python-hyper/hpack/"
"Documentation" = "https://python-hyper.org/"
[dependency-groups]
dev = [
{ include-group = "testing" },
{ include-group = "linting" },
{ include-group = "packaging" },
{ include-group = "docs" },
]
testing = [
"pytest>=8.3.3,<9",
"pytest-cov>=6.0.0,<7",
"pytest-xdist>=3.6.1,<4",
"hypothesis>=6.119.4,<7",
]
linting = [
"ruff>=0.8.0,<1",
"mypy>=1.13.0,<2",
"typing_extensions>=4.12.2",
]
packaging = [
"check-manifest==0.50",
"readme-renderer==44.0",
"build>=1.2.2,<2",
"twine>=5.1.1,<6",
"wheel>=0.45.0,<1",
]
docs = [
"sphinx>=7.4.7,<9",
]
[tool.setuptools.packages.find]
where = [ "src" ]
[tool.setuptools.package-data]
hpack = [ "py.typed" ]
[tool.setuptools.dynamic]
version = { attr = "hpack.__version__" }
[tool.ruff]
line-length = 150
target-version = "py39"
format.preview = true
format.docstring-code-line-length = 100
format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.ignore = [
"ANN401", # kwargs with typing.Any
"CPY", # not required
"D101", # docs readability
"D102", # docs readability
"D105", # docs readability
"D107", # docs readability
"D200", # docs readability
"D205", # docs readability
"D205", # docs readability
"D203", # docs readability
"D212", # docs readability
"D400", # docs readability
"D401", # docs readability
"D415", # docs readability
"PLR2004", # readability
"SIM108", # readability
"RUF012", # readability
"FBT001", # readability
"FBT002", # readability
"PGH003", # readability
"PGH004", # readability
"PYI034", # PEP 673 not yet available in Python 3.9 - only in 3.11+
]
lint.isort.required-imports = [ "from __future__ import annotations" ]
[tool.mypy]
show_error_codes = true
strict = true
[tool.pytest.ini_options]
testpaths = [ "tests" ]
[tool.coverage.run]
branch = true
source = [ "hpack" ]
[tool.coverage.report]
fail_under = 100
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError()",
]
[tool.coverage.paths]
source = [
"src/",
".tox/**/site-packages/",
]
[tool.tox]
min_version = "4.23.2"
env_list = [ "py39", "py310", "py311", "py312", "py313", "pypy3", "lint", "docs", "packaging" ]
[tool.tox.gh-actions]
python = """
3.9: py39, h2spec, lint, docs, packaging
3.10: py310
3.11: py311
3.12: py312
3.13: py313
pypy3: pypy3
"""
[tool.tox.env_run_base]
pass_env = [
"GITHUB_*",
]
dependency_groups = ["testing"]
commands = [
["pytest", "--cov-report=xml", "--cov-report=term", "--cov=hpack", { replace = "posargs", extend = true }]
]
[tool.tox.env.pypy3]
# temporarily disable coverage testing on PyPy due to performance problems
commands = [
["pytest", { replace = "posargs", extend = true }]
]
[tool.tox.env.lint]
dependency_groups = ["linting"]
commands = [
["ruff", "check", "src/"],
["mypy", "src/"],
]
[tool.tox.env.docs]
dependency_groups = ["docs"]
allowlist_externals = ["make"]
changedir = "{toxinidir}/docs"
commands = [
["make", "clean"],
["make", "html"],
]
[tool.tox.env.packaging]
base_python = ["python39"]
dependency_groups = ["packaging"]
allowlist_externals = ["rm"]
commands = [
["rm", "-rf", "dist/"],
["check-manifest"],
["python", "-m", "build", "--outdir", "dist/"],
["twine", "check", "dist/*"],
]
[tool.tox.env.publish]
base_python = "{[tool.tox.env.packaging]base_python}"
deps = "{[tool.tox.env.packaging]deps}"
allowlist_externals = "{[tool.tox.env.packaging]allowlist_externals}"
commands = [
"{[testenv:packaging]commands}",
["twine", "upload", "dist/*"],
]
[tool.tox.env.bench]
deps = [
"{[tool.tox.env]deps}",
"pytest-benchmark==3.2.3",
]
commands = [
["pytest {toxinidir}/bench/ --benchmark-only --benchmark-group-by=name --benchmark-autosave --benchmark-compare --benchmark-min-rounds=500000"],
]
[tool.tox.env.create_test_output]
base_python = ["python3.9"]
commands = [
["python", "{toxinidir}/utils/create_test_output.py", { replace = "posargs", extend = true }],
]