forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
294 lines (254 loc) · 7.48 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
289
290
291
292
293
294
[build-system]
requires = [
"hatchling >= 1.10.0",
"hatch-fancy-pypi-readme >= 22.5.0",
"incremental >= 22.10.0",
]
build-backend = "hatchling.build"
[project]
name = "Twisted"
dynamic = [
"version",
"readme",
# Remove this when the legacy optional dependency names are removed
"optional-dependencies",
]
description = "An asynchronous networking framework written in Python"
license = "MIT"
# When updating this value, make sure our CI matrix includes a matching minimum version.
requires-python = ">=3.7.1"
authors = [
{ name = "Twisted Matrix Laboratories", email = "twisted-python@twistedmatrix.com" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"zope.interface >= 5",
"constantly >= 15.1",
"incremental >= 22.10.0",
"Automat >= 0.8.0",
"hyperlink >= 17.1.1",
"attrs >= 21.3.0",
"typing_extensions >= 3.10.0",
"twisted-iocpsupport >= 1.0.2, <2; platform_system == 'Windows'",
]
# Switch to this when the legacy optional dependency names are removed
# [project.optional-dependencies]
[tool.hatch.metadata.hooks.custom.optional-dependencies]
# This is list of minimum dependencies required to run the tests.
# The plan is to remove the `test` extra requirement and skip tests that
# depend on them
# To prevent trunk failures we should pin all dev dependencies to minor
# versions.
# We trust semantic versioning and auto-upgrading to a bugfix release
# should be OK.
test = [
"cython-test-exception-raiser >= 1.0.2, <2",
"PyHamcrest >= 2",
"hypothesis >= 6.56",
]
# List of dependencies required to build the documentation and test the
# release scripts and process.
dev-release = [
"towncrier ~= 22.12",
"pydoctor ~= 23.4.0",
"sphinx-rtd-theme ~= 1.2",
"readthedocs-sphinx-ext ~= 2.2",
# We can move to v6 once we no longer need to support Python 3.7.
"sphinx >= 5, <7",
# This is due to cachecontrol not being compatible with urllib3>=2.0
# See https://github.com/ionrock/cachecontrol/issues/293
"urllib3 <2",
]
# All the extra tools used to help with the development process.
dev = [
"twisted[dev-release]",
"pyflakes ~= 2.2",
# TODO: support python-subunit in py3.10 https://github.com/twisted/twisted/issues/10115
"python-subunit ~= 1.4; python_version < '3.10'",
"twistedchecker ~= 0.7",
"coverage >= 6b1, <7",
]
tls = [
"pyopenssl >= 21.0.0",
# service_identity 18.1.0 added support for validating IP addresses in
# certificate subjectAltNames
"service_identity >= 18.1.0",
"idna >= 2.4",
]
conch = [
"cryptography >= 3.3",
"appdirs >= 1.4.0",
"bcrypt >= 3.1.3",
]
serial = [
"pyserial >= 3.0",
"pywin32 != 226; platform_system == 'Windows'",
]
http2 = [
"h2 >= 3.0, < 5.0",
"priority >= 1.1.0, < 2.0",
]
contextvars = [
"contextvars >= 2.4, < 3; python_version < '3.7'",
]
all-non-platform = [
"twisted[test,tls,conch,serial,http2,contextvars]",
]
macos-platform = [
"twisted[all-non-platform]",
"pyobjc-core",
"pyobjc-framework-CFNetwork",
"pyobjc-framework-Cocoa",
]
windows-platform = [
"twisted[all-non-platform]",
"pywin32 != 226",
]
osx-platform = [
"twisted[macos-platform]",
]
gtk-platform = [
"twisted[all-non-platform]",
"pygobject",
]
mypy = [
"twisted[dev,all-non-platform,conch-nacl]",
"mypy==0.981",
"mypy-zope==0.3.11",
"mypy-extensions==0.4.3",
"types-setuptools",
"types-pyOpenSSL",
]
[project.scripts]
cftp = "twisted.conch.scripts.cftp:run"
ckeygen = "twisted.conch.scripts.ckeygen:run"
conch = "twisted.conch.scripts.conch:run"
mailmail = "twisted.mail.scripts.mailmail:run"
pyhtmlizer = "twisted.scripts.htmlizer:run"
tkconch = "twisted.conch.scripts.tkconch:run"
trial = "twisted.scripts.trial:run"
twist = "twisted.application.twist._twist:Twist.main"
twistd = "twisted.scripts.twistd:run"
[project.urls]
Changelog = "https://github.com/twisted/twisted/blob/HEAD/NEWS.rst"
Documentation = "https://docs.twistedmatrix.com/"
Homepage = "https://twistedmatrix.com/"
Issues = "https://twistedmatrix.com/trac/report"
Source = "https://github.com/twisted/twisted"
Twitter = "https://twitter.com/twistedmatrix"
[tool.hatch.metadata]
# This is here to enable backward compatible extra dependencies
# that are defined using underscores.
allow-ambiguous-features = true
[tool.hatch.version]
source = "code"
path = "src/twisted/__init__.py"
search-paths = ["src"]
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
fragments = [
{ path = "README.rst" },
]
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
# Munge links of the form `NEWS <NEWS.rst>`_ to point at the appropriate
# location on GitHub so that they function when the long description is
# displayed on PyPI.
pattern = '`([^`]+)\s+<(?!https?://)([^>]+)>`_'
replacement = '`\1 <https://github.com/twisted/twisted/blob/trunk/\2>`_'
ignore-case = true
[tool.hatch.build.targets.wheel]
packages = [
"src/twisted",
]
exclude = [
"*.pxi",
"*.pyx",
"build.bat",
]
[tool.hatch.build.targets.sdist]
# This dictates what goes into a sdist tarball.
# As a release tarball, we want to include:
# - All of the library code.
# - All the useful documentation (but not the super historic stuff)
# - All of the test files, so that the tests can be run on an installed copy.
# We do not want to include:
# - Release management files (e.g. topfiles)
# - Things only useful when running from a source checkout
include = [
# Documentation
"/docs",
# Library code
"/src",
"/CONTRIBUTING.md",
"/INSTALL.rst",
"/NEWS.rst",
"/README.rst",
"/code_of_conduct.md",
# Test-running utilities for downstream packagers
"/.coveragerc",
"/mypy.ini",
"/tox.ini",
]
[tool.towncrier]
package = "twisted"
package_dir = "src"
filename = "NEWS.rst"
[[tool.towncrier.section]]
path = ""
[[tool.towncrier.section]]
path = "conch"
name = "Conch"
[[tool.towncrier.section]]
path = "web"
name = "Web"
[[tool.towncrier.section]]
path = "mail"
name = "Mail"
[[tool.towncrier.section]]
path = "words"
name = "Words"
[[tool.towncrier.section]]
path = "names"
name = "Names"
[[tool.towncrier.section]]
path = "trial"
name = "Trial"
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Misc"
showcontent = false
[tool.black]
target-version = ['py36', 'py37', 'py38']
[tool.isort]
profile = "black"
sections = "FUTURE,STDLIB,ZOPE,OPENSSL,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
default_section = "THIRDPARTY"
no_lines_before = "LOCALFOLDER"
known_first_party = "twisted"
known_zope = "zope"
known_openssl = "OpenSSL"
combine_as_imports = true
skip = "src/twisted/logger/__init__.py,src/twisted/internet/reactor.py"