-
-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathpyproject.toml
More file actions
259 lines (249 loc) · 8.49 KB
/
Copy pathpyproject.toml
File metadata and controls
259 lines (249 loc) · 8.49 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
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
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.5",
"hatchling>=1.29",
]
[project]
name = "filelock"
description = "A platform independent file lock."
readme = "README.md"
keywords = [
"application",
"cache",
"directory",
"log",
"user",
]
license = "MIT"
maintainers = [
{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" },
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: System",
]
dynamic = [
"version",
]
urls.Documentation = "https://py-filelock.readthedocs.io"
urls.Homepage = "https://github.com/tox-dev/py-filelock"
urls.Source = "https://github.com/tox-dev/py-filelock"
urls.Tracker = "https://github.com/tox-dev/py-filelock/issues"
[dependency-groups]
dev = [
{ include-group = "coverage" },
{ include-group = "docs" },
{ include-group = "fix" },
{ include-group = "pkg-meta" },
{ include-group = "release" },
{ include-group = "test" },
{ include-group = "type" },
]
test = [
"covdefaults>=2.3",
"diff-cover>=10.2",
"exceptiongroup>=1.2; python_version<'3.11'",
"pytest>=9.0.3",
"pytest-asyncio>=1.3",
"pytest-cov>=7.1",
"pytest-mock>=3.15.1",
"pytest-randomly>=3.16",
"pytest-timeout>=2.4",
"virtualenv>=21.2",
]
type = [
"ty>=0.0.30",
{ include-group = "docs" },
{ include-group = "release" },
{ include-group = "test" },
]
docs = [
"furo>=2025.12.19",
"sphinx>=9.1",
"sphinx-autodoc-typehints>=3.9.11",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.7",
"sphinx-llm>=0.4.1",
"sphinx-sitemap>=2.9",
"sphinxcontrib-mermaid>=2.0.1",
"sphinxcontrib-towncrier>=0.5.0a0",
"sphinxext-opengraph>=0.13",
"towncrier>=24.8",
]
coverage = [
"covdefaults>=2.3",
"coverage[toml]>=7.13.5",
"diff-cover>=10.2",
]
fix = [
"pre-commit-uv>=4.2.1",
]
pkg-meta = [
"check-wheel-contents>=0.6.3",
"twine>=6.2",
"uv>=0.11.5",
]
release = [
"towncrier>=24.8",
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/filelock/version.py"
build.targets.sdist.include = [
"/src",
"/tasks",
"/tests",
"/tox.toml",
]
[tool.ruff]
line-length = 120
format.preview = true
format.docstring-code-line-length = 100
format.docstring-code-format = true
lint.select = [
"ALL",
]
lint.ignore = [
"CPY", # No copyright statements
"DOC", # no support yet
"escape-sequence-in-docstring", # Use `r"""` if any backslashes in a docstring
"hardcoded-bind-all-interfaces", # Possible binding to all interface
"incorrect-blank-line-before-class", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"missing-blank-line-after-summary", # 1 blank line required between summary line and description
"missing-trailing-comma", # Conflict with formatter
"multi-line-summary-first-line", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
"non-empty-init-module", # `__init__` module should only contain docstrings and re-exports
"non-imperative-mood", # First line of docstring should be in imperative mood
"single-line-implicit-string-concatenation", # Conflict with formatter
]
lint.per-file-ignores."tasks/**/*.py" = [
"assert", # asserts state the platform a Windows-only script already refuses to run outside of, narrowing it for ty
"D", # don't care about documentation in tasks scripts
"implicit-namespace-package", # no implicit namespace
"print", # print allowed in scripts
"subprocess-without-shell-equals-true", # `subprocess` call: check for execution of untrusted input
]
lint.per-file-ignores."tests/**/*.py" = [
"assert", # asserts allowed in tests
"blind-except", # blind exception catching acceptable in test helpers
"D", # don't care about documentation in tests
"FBT", # don't care about booleans as positional arguments in tests
"implicit-namespace-package", # no implicit namespace
"import-outside-top-level", # import should be at top-level
"import-private-name", # private name import from external module
"magic-value-comparison", # Magic value used in comparison, consider replacing with a constant variable
"non-lowercase-variable-in-function", # variable in function should be lowercase
"private-member-access", # accessing private members acceptable in tests
"pytest-fixture-autouse", # shared setup fixtures are meant to apply to every test
"subprocess-without-shell-equals-true", # `subprocess` call: check for execution of untrusted input
"too-many-arguments", # too many arguments in function definition
"too-many-positional-arguments", # too many positional arguments
"too-many-statements-in-try-clause", # try/finally cleanup blocks in tests legitimately hold many statements
]
lint.isort = { known-first-party = [
"filelock",
], required-imports = [
"from __future__ import annotations",
] }
lint.preview = true
[tool.codespell]
builtin = "clear,usage,en-GB_to_en-US"
ignore-words-list = "master"
count = true
quiet-level = 3
[tool.pyproject-fmt]
max_supported_python = "3.15"
[tool.ty]
src.exclude = []
# Mirrors pytest's pythonpath so the tests' `coverage_pragmas` import resolves here too.
environment.extra-paths = [
".",
"tasks",
]
environment.python-version = "3.14"
[tool.pytest]
ini_options.testpaths = [
"tests",
]
# The project root lets the tests import each other as tests.*; tasks holds coverage_pragmas, whose CAPABILITIES probes
# drive both the coverage exclusions and the skipif gates, so a test can never be skipped while coverage still demands
# its lines. coverage imports that plugin by name in the subprocesses it patches, so it stays a top-level module.
ini_options.pythonpath = [
".",
"tasks",
]
ini_options.markers = [
"requires_hard_links: exercises StrictSoftFileLock, which needs os.link; skipped where it is missing (Termux/Android)",
]
ini_options.filterwarnings = [
"error",
# CPython's resource tracker refuses to unregister a semaphore while it is already cleaning up, and warns instead.
# multiprocessing.Event and Value expose no close, so only the collector frees them, and it picks the moment. Seen
# on 3.12 alone. Filtering the tracker's own warning keeps the finalizer from raising rather than hiding the raise.
"ignore:ResourceTracker called reentrantly for resource cleanup:UserWarning",
]
ini_options.verbosity_assertions = 2
ini_options.asyncio_default_fixture_loop_scope = "session"
ini_options.timeout = 20
[tool.coverage]
# The pragma plugin configures the run; measuring it would report the tooling alongside the package under test.
run.omit = [
"*/tasks/*",
]
run.concurrency = [
"multiprocessing",
"thread",
]
run.parallel = true
run.plugins = [
"covdefaults",
"coverage_pragmas",
]
run.patch = [
"_exit",
"subprocess",
]
run.sigterm = true
paths.other = [
".",
"*/filelock",
"*\\filelock",
]
paths.source = [
"src",
"*/.tox/*/lib/*/site-packages",
"*/.tox/*/Lib/site-packages",
"**/src",
"**\\src",
]
report.fail_under = 100
html.skip_covered = false
[tool.towncrier]
name = "filelock"
directory = "docs/changelog"
filename = "docs/changelog.rst"
template = "docs/changelog/template.jinja2"
title_format = false
issue_format = ":pr:`{issue}`"
type = [
{ directory = "breaking", name = "Backward incompatible changes", showcontent = true },
{ directory = "feature", name = "Features", showcontent = true },
{ directory = "bugfix", name = "Bug fixes", showcontent = true },
{ directory = "doc", name = "Improved documentation", showcontent = true },
{ directory = "packaging", name = "Packaging updates", showcontent = true },
]