Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (113 loc) · 3.17 KB
/
Copy pathpyproject.toml
File metadata and controls
127 lines (113 loc) · 3.17 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
[build-system]
requires = ["maturin>=1.5,<2.0"]
build-backend = "maturin"
[project]
name = "safexml"
version = "1.3.2"
description = "High-performance, secure, modern XML parser and drop-in defusedxml replacement built in Rust"
authors = [
{ name = "Bailey Nguyen", email = "bailey.tan.nguyen@gmail.com" }
]
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.12"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Rust",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup :: XML",
"Topic :: Security",
"Typing :: Typed",
]
dependencies = []
keywords = [
"xml",
"security",
"xxe",
"osv",
"defusedxml",
"polyxml",
"cwe-611",
"cwe-776",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"pytest-benchmark>=5.0.0",
"ruff>=0.4.0",
"mypy>=1.10.0",
"defusedxml>=0.7.1",
"hypothesis>=6.100.0",
]
[project.urls]
Homepage = "https://github.com/polyxml/safexml"
Documentation = "https://github.com/polyxml/safexml#readme"
Repository = "https://github.com/polyxml/safexml"
Issues = "https://github.com/polyxml/safexml/issues"
Changelog = "https://github.com/polyxml/safexml/releases"
"Security Advisories" = "https://github.com/polyxml/safexml/security/advisories"
[tool.maturin]
features = ["extension-module"]
python-source = "python"
module-name = "safexml._safexml"
strip = true
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "--color=yes -v --cov=safexml --cov-report=term-missing --cov-fail-under=100"
[tool.coverage.run]
source = ["safexml"]
omit = ["tests/*", "python/safexml/_safexml.*"]
branch = true
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"SIM", # flake8-simplify
"D", # pydocstyle (Google convention)
"ANN", # flake8-annotations
"C4", # flake8-comprehensions
"PT", # flake8-pytest-style
"RET", # flake8-return
"RUF", # Ruff-specific rules
]
ignore = [
"E501",
"ANN401", # Dynamically typed expressions (typing.Any) are required for stdlib compatibility
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D101", "D102", "D103", "D105", "D107"]
"benchmarks/*" = ["D101", "D102", "D103", "D105", "D107"]
"scripts/*" = ["D101", "D102", "D103", "D105", "D107"]
[tool.ruff.lint.isort]
known-first-party = ["safexml"]