-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathpyproject.toml
More file actions
209 lines (185 loc) · 6.36 KB
/
pyproject.toml
File metadata and controls
209 lines (185 loc) · 6.36 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
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "django-postgres-extra"
description = "Bringing all of PostgreSQL's awesomeness to Django."
readme = "README.md"
license = {text = "MIT License"}
authors = [{name = "Sector Labs", email = "open-source@sectorlabs.ro"}]
keywords = [
"django",
"postgres",
"extra",
"hstore",
"upsert",
"partioning",
"materialized",
"view",
]
classifiers = [
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
requires-python = ">=3.7"
dependencies = [
"Django>=2.0,<6.0",
"python-dateutil>=2.8.0,<=3.0.0",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/SectorLabs/django-postgres-extra"
[project.optional-dependencies]
dev = [
"poethepoet==0.34.0; python_version >= '3.9'",
"poethepoet==0.30.0; python_version >= '3.8' and python_version < '3.9'",
"poethepoet==0.19.0; python_version >= '3.7' and python_version < '3.8'",
]
test = [
"psycopg2==2.9.10; python_version >= '3.8'",
"psycopg2==2.9.9; python_version >= '3.7' and python_version < '3.8'",
"types-psycopg2==2.9.21.20250516; python_version >= '3.9'",
"types-psycopg2==2.9.8; python_version < '3.9'",
"pytest==8.4.0; python_version > '3.8'",
"pytest==7.0.1; python_version <= '3.8'",
"pytest-benchmark==5.1.0; python_version > '3.8'",
"pytest-benchmark==3.4.1; python_version <= '3.8'",
"pytest-django==4.11.1; python_version > '3.7'",
"pytest-django==4.5.2; python_version <= '3.7'",
"pytest-cov==6.1.1; python_version > '3.8'",
"pytest-cov==4.0.0; python_version <= '3.8'",
"coverage==7.8.2; python_version > '3.8'",
"coverage==7.6.1; python_version >= '3.8' and python_version <= '3.8'",
"coverage==6.2; python_version <= '3.7'",
"tox==4.26.0; python_version > '3.8'",
"tox==3.28.0; python_version <= '3.8'",
"freezegun==1.5.2; python_version > '3.7'",
"freezegun==1.2.2; python_version <= '3.7'",
"syrupy==4.9.1; python_version >= '3.9'",
"syrupy==2.3.1; python_version <= '3.8'",
]
test-report = ["coveralls==4.0.1"]
analysis = [
"black==22.3.0",
"flake8==7.2.0",
"autoflake==2.3.1",
"autopep8==2.3.2",
"isort==6.0.1",
"docformatter==1.7.7",
"mypy==1.16.0",
"django-stubs==4.2.7",
"typing-extensions==4.14.0",
"types-dj-database-url==1.3.0.4",
"types-python-dateutil==2.9.0.20250516",
]
docs = [
"Sphinx==8.2.3",
"sphinx-rtd-theme==3.0.2",
"docutils==0.21.2",
"Jinja2==3.1.6",
]
publish = [
"build==0.7.0",
"twine==3.7.1",
]
[tool.setuptools.dynamic]
version = {attr = "psqlextra._version.__version__"}
[tool.setuptools.packages.find]
exclude = ["tests*"]
[tool.setuptools.package-data]
psqlextra = ["py.typed"]
[tool.uv]
required-version = ">=0.11.2"
# Supply chain attack mitigation: only resolve package versions published
# at least 3 days ago. This quarantine window lets the community flag
# malicious releases before they reach our lockfile or a developer's
# laptop. Motivated by the March 2026 LiteLLM / TeamPCP incident
# (backdoored litellm 1.82.7/1.82.8 on PyPI).
# https://simonwillison.net/2026/Mar/24/package-managers-need-to-cool-down/
exclude-newer = "3 days"
# The library supports Python 3.7+ (`requires-python` above) for downstream
# pip users, but the `analysis`, `docs`, `publish`, and `test-report` extras
# pin tools (Sphinx, mypy, twine, ...) that require Python 3.11+. CI runs
# those extras on 3.11 only; the matrix tests across 3.7-3.13 use tox + pip,
# not this lockfile. Restrict uv's resolution to 3.11+ so `uv lock` can
# solve.
environments = ["python_version >= '3.11'"]
[tool.black]
line-length = 80
exclude = '''
(
/(
| .env
| env
| venv
| tests/__snapshots__
)/
)
'''
[tool.mypy]
python_version = "3.8"
plugins = ["mypy_django_plugin.main"]
mypy_path = ["stubs", "."]
exclude = "(env|build|dist|migrations)"
[[tool.mypy.overrides]]
module = [
"psycopg.*",
"django.db.models.fields.composite"
]
ignore_missing_imports = true
[tool.django-stubs]
django_settings_module = "settings"
[tool.poe.tasks]
_autoflake = "python3 -m autoflake --remove-all -i -r psqlextra tests"
_autopep8 = "autopep8 -i -r psqlextra tests"
_isort_psqlextra = "isort psqlextra"
_isort_tests = "isort tests"
_isort_verify_psqlextra = "isort -c psqlextra"
_isort_verify_tests = "isort -c tests"
[tool.poe.tasks.lint]
cmd = "python3 -m flake8 psqlextra tests"
help = "Lints all the code."
[tool.poe.tasks.lint_fix]
sequence = ["_autoflake", "_autopep8"]
help = "Auto-fixes linter errors."
[tool.poe.tasks.lint_types]
cmd = "mypy --package psqlextra --pretty --show-error-codes"
help = "Type-checks the code."
[tool.poe.tasks.format]
cmd = "black psqlextra tests"
help = "Auto-formats the code."
[tool.poe.tasks.format_verify]
cmd = "black --check psqlextra tests"
help = "Verifies that the code was formatted properly."
[tool.poe.tasks.format_docstrings]
cmd = "docformatter -r -i ."
help = "Auto-formats doc strings."
[tool.poe.tasks.format_docstrings_verify]
cmd = "docformatter -r -c ."
help = "Verifies all doc strings are properly formatted."
[tool.poe.tasks.sort_imports]
sequence = ["_isort_psqlextra", "_isort_tests"]
help = "Auto-sorts the imports."
[tool.poe.tasks.sort_imports_verify]
sequence = ["_isort_verify_psqlextra", "_isort_verify_tests"]
help = "Verifies that the imports are properly sorted."
[tool.poe.tasks.fix]
sequence = ["format", "format_docstrings", "sort_imports", "lint_fix", "lint", "lint_types"]
help = "Automatically format code and fix linting errors."
[tool.poe.tasks.verify]
sequence = ["format_verify", "format_docstrings_verify", "sort_imports_verify", "lint", "lint_types"]
help = "Automatically format code and fix linting errors."
[tool.poe.tasks.test]
cmd = "pytest --cov=psqlextra --cov-report=term --cov-report=xml:reports/xml --cov-report=html:reports/html --junitxml=reports/junit/tests.xml --reuse-db -vv"
help = "Runs all the tests."