-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (126 loc) · 5.02 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (126 loc) · 5.02 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
[project]
name = "tina4-python"
version = "3.13.137"
description = "Tina4 Python v3 — Zero-dependency, lightweight web framework"
authors = [
{name = "Andre van Zuydam", email = "andrevanzuydam@gmail.com"}
]
readme = "README.md"
requires-python = ">=3.12"
license = {text = "MIT"}
# ZERO core dependencies — this is v3's defining feature
dependencies = []
[project.optional-dependencies]
# Database drivers — install what you need
postgres = ["psycopg2-binary>=2.9"]
mysql = ["mysql-connector-python>=9.0"]
mssql = ["pymssql>=2.3"]
firebird = ["firebird-driver>=1.10"]
mongo = ["pymongo>=4.0"]
odbc = ["pyodbc>=5.0"]
# Graph engine drivers — install what you need (loaded lazily on first use).
# The graph core is zero-dependency; a driver is a cost paid only per engine.
ultipa = ["tina4-ultipa>=0.1", "protobuf>=7.35.1"] # gencode needs protobuf 7.x; floor pins the CVE-free runtime
neo4j = ["neo4j>=5.0"] # the Bolt driver also serves Memgraph
arango = ["python-arango>=8.0"]
graph = ["tina4-ultipa>=0.1", "protobuf>=7.35.1", "neo4j>=5.0", "python-arango>=8.0"]
# Session backends — install what you need
redis = ["redis>=5.0"]
memcache = ["pymemcache>=4.0"]
# File-storage backends — install what you need.
# The `local` filesystem backend is the zero-dependency default; S3Storage
# (TINA4_STORAGE_BACKEND=s3) is opt-in and imports boto3 lazily.
s3 = ["boto3>=1.34"]
# Queue backends — install what you need
kafka = ["confluent-kafka>=2.0"]
rabbitmq = ["pika>=1.3"]
# Web Push is zero-dependency on the server: the crypto runs through the OS
# OpenSSL (libcrypto) by ctypes, so a Linux host needs nothing installed. This
# extra is the DEV FALLBACK - on a stock Mac or a Windows workstation ctypes
# cannot reach a safe OpenSSL, so the cryptography package runs instead. Install
# it there (or pin it with TINA4_PUSH_BACKEND=cryptography); the wire output is
# identical either way. See tina4_python/push/_libcrypto.py.
push = ["cryptography>=42.0"]
# All database drivers
all-db = [
"psycopg2-binary>=2.9",
"mysql-connector-python>=9.0",
"pymssql>=2.3",
"firebird-driver>=1.10",
"pymongo>=4.0",
"pyodbc>=5.0",
]
# Every client the TEST SUITE needs against live services.
#
# These were installed ad hoc by CI (`uv pip install pymongo confluent-kafka
# pika ...`) and declared nowhere, so a fresh host had no way to know what the
# suite requires. confluent-kafka and pika in particular were in NO extra: the
# lab host's first full-suite run failed with three "confluent-kafka not
# installed" errors, correctly raised by the TINA4_REQUIRE_SERVICES gate, and
# `uv sync --all-extras` could not have fixed it because the dependency was not
# expressed anywhere. One declared extra means `uv sync --extra test` is
# reproducible on any machine.
#
# Includes firebird-driver even though the Firebird CI job installs it on its
# own: `uv sync --extra X` PRUNES anything outside the named extras, so a test
# extra that omitted it would silently uninstall it on a host that had it.
#
# boto3 is here for exactly that reason, MEASURED on the lab 2026-08-06
# (Ubuntu 24.04.4 LTS x86_64, Python 3.13.3): it was declared in NO extra, but
# happened to be installed ad hoc, so the two REAL-MinIO tests in
# tests/test_realtime_files.py were passing. Running `uv sync --extra test`
# pruned boto3 (plus s3transfer and jmespath) and those tests went straight from
# "2 passed" to "2 skipped" -- with the suite still GREEN under
# TINA4_REQUIRE_SERVICES=1, because the skip reason matched neither a service
# keyword nor an unavailable hint in the conftest gate. Live S3 coverage
# evaporated silently. Declaring it here is the fix; tests/conftest.py now also
# recognises a missing boto3 so the gate can never miss it again.
test = [
"psycopg2-binary>=2.9",
"mysql-connector-python>=9.0",
"pymssql>=2.3",
"firebird-driver>=1.10",
"pymongo>=4.0",
"pyodbc>=5.0",
"redis>=5.0",
"pymemcache>=4.0",
"confluent-kafka>=2.0",
"pika>=1.3",
"boto3>=1.34",
# TEST-ONLY: validates the generated OpenAPI document against the real
# OpenAPI 3.0/3.1 schema (tests/test_swagger_contract.py). NEVER a framework
# runtime dependency — the swagger generator itself stays zero-dependency.
"openapi-spec-validator>=0.7",
# TEST-ONLY: exercises Feature 140's optional native crypto capability.
"cryptography>=42.0",
]
[dependency-groups]
dev = [
"bottle>=0.13.4",
"cython>=3.2.4",
"django>=6.0.3",
"fastapi>=0.135.1",
"flask>=3.1.3",
"pytest>=8.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"reportlab>=4.4.10",
"setuptools>=82.0.1",
"uvicorn>=0.42.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
include = ["tina4_python/**/*"]
[project.scripts]
tina4python = "tina4_python.cli:main"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
markers = [
"slow: a test that needs real wall-clock time to reproduce a timing bug (deselect with -m 'not slow')",
]
[tool.ruff]
target-version = "py312"
line-length = 120