-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathpyproject.toml
More file actions
183 lines (159 loc) · 5.72 KB
/
pyproject.toml
File metadata and controls
183 lines (159 loc) · 5.72 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
[build-system]
requires = ["hatchling>=1.27.0", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "caldav/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
".#*", # Emacs lock files
"#*#", # Emacs auto-save files
"*~", # Backup files
"*.swp", # Vim swap files
"*.pyc", # Python bytecode
"__pycache__",
]
[tool.hatch.build.targets.wheel]
exclude = [
".#*",
"#*#",
"*~",
"*.swp",
"*.pyc",
"__pycache__",
]
[project]
name = "caldav"
authors = [{ name = "Cyril Robert", email = "cyril@hippie.io" }, { name = "Tobias Brox", email = "caldav@plann.no" }]
license = "GPL-3.0-or-later OR Apache-2.0"
license-files = ["COPYING.*"]
description = "CalDAV (RFC4791) client library"
keywords = []
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Topic :: Office/Business :: Scheduling",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"lxml",
"niquests",
"recurring-ical-events>=2.0.0",
"typing_extensions;python_version<'3.11'",
"icalendar>6.0.0",
"icalendar-searcher>=1.0.5,<2",
"dnspython",
"python-dateutil",
"PyYAML",
]
dynamic = ["version"]
[project.urls]
Repository = "https://github.com/python-caldav/caldav"
Issues = "https://github.com/python-caldav/caldav/issues"
Documentation = "https://caldav.readthedocs.io/"
Changelog = "https://github.com/python-caldav/caldav/blob/master/CHANGELOG.md"
[project.optional-dependencies]
test = [
"vobject",
"pytest",
"pytest-asyncio",
"coverage",
"manuel",
"proxy.py",
"tzlocal",
"xandikos>=0.3.3",
"radicale",
"pyfakefs",
"httpx",
#"caldav_server_tester"
"deptry>=0.24.0; python_version >= '3.10'",
]
[tool.setuptools_scm]
write_to = "caldav/_version.py"
[tool.setuptools]
py-modules = ["caldav"]
include-package-data = true
[tool.setuptools.packages.find]
exclude = ["tests"]
namespaces = false
[tool.deptry]
ignore = ["DEP002"] # Test dependencies (pytest, coverage, etc.) are not imported in main code
[tool.deptry.per_rule_ignores]
DEP001 = ["conf", "h2"] # conf: Local test config, h2: Optional HTTP/2 support
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade (modernize code)
"B", # flake8-bugbear (find bugs)
]
ignore = [
"E501", # Line too long (formatter handles this)
"E402", # Module level import not at top of file (common with conditional imports)
"E721", # Type comparisons (isinstance is not always better)
"E722", # Bare except (TODO: fix these gradually)
"E731", # Lambda assignments (sometimes clearer than def)
"B007", # Unused loop variable (often intentional)
"B011", # assert False (used as unreachable markers)
"B018", # Useless expression (often intentional in tests)
"B026", # Star-arg after keyword (legacy pattern)
"B028", # stacklevel in warnings (not critical)
"B904", # raise from (TODO: fix gradually)
"F401", # Unused imports (many are for re-export or conditional)
"F403", # Star imports (legacy, TODO: fix gradually)
"F821", # Undefined names (often in TYPE_CHECKING blocks or docstrings)
"F841", # Unused variables (often intentional, e.g. unpacking)
"UP007", # Optional[X] vs X | None (used in try/except for backwards compat)
"UP008", # super() style (existing code uses explicit form)
"UP031", # %-format (existing code uses it extensively)
"UP036", # Outdated version blocks (will clean up when dropping old Python)
"UP038", # isinstance tuple vs | (used in try/except for backwards compat)
"UP045", # X | None vs Optional (both are fine)
]
[tool.ruff.lint.per-file-ignores]
# Examples and docs may have undefined names for illustration
"examples/*.py" = ["F821"]
"docs/**/*.py" = ["F821"]
# Tests may use assertions and have unusual patterns
"tests/*.py" = ["B011", "B017"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint.isort]
known-first-party = ["caldav"]
[tool.pytest.ini_options]
asyncio_mode = "strict"
filterwarnings = [
# Treat all warnings as errors by default
"error",
# Allow missing _version.py warning during development/testing (generated by hatch-vcs on build/install)
"ignore:You need to install the `build` package:UserWarning",
# Ignore deprecation warnings from external libraries we can't control
# https://github.com/jawah/niquests/pull/327 https://github.com/jawah/niquests/issues/326
"ignore:.*asyncio.iscoroutinefunction.*:DeprecationWarning:niquests",
# Radicale upstream bugs: unclosed resources during server shutdown
# https://github.com/Kozea/Radicale/issues/1972
"ignore:unclosed.*:ResourceWarning",
"ignore:Exception ignored.*:pytest.PytestUnraisableExceptionWarning",
# Radicale uses deprecated importlib.abc.Traversable (Python 3.14 removal)
"ignore:.*importlib.abc.Traversable.*:DeprecationWarning",
# Show conf_private.py deprecation warning once (not as error) during migration period
"once:conf_private.py is deprecated:DeprecationWarning",
# Zimbra test server uses HTTPS with self-signed cert (ssl_verify_cert=False)
"ignore:Unverified HTTPS request:urllib3_future.exceptions.InsecureRequestWarning",
]