Skip to content

Commit 0dd0787

Browse files
authored
Merge pull request #209 from tina4stack/release/3.13.149
release: 3.13.149
2 parents bf8a40a + ece27cd commit 0dd0787

6 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Tina4 Python — Agent Instructions
22

3-
v3.13.148. 140 cataloged features, zero dependencies. Python 3.12+.
3+
v3.13.149. 140 cataloged features, zero dependencies. Python 3.12+.
44

55
## AI Skills
66

‎CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ https://tina4.com/python/36-releases
99
This file records framework-specific changes. The release notes above remain the
1010
authority for shipped versions.
1111

12+
## 3.13.149 — 2026-10-10
13+
14+
### CRUD
15+
- A CRUD admin page out of the box: `Crud.to_crud(request, model=Model)` renders a
16+
searchable, sortable, paginated admin screen and registers the model's AutoCrud routes (ADR-0094).
17+
18+
### Migrations
19+
- Startup auto-migration holds a cross-process lock, so concurrent boots apply each migration
20+
exactly once; the SQLite/Firebird lock file now lives in the system temp dir (#277).
21+
22+
### Dev server
23+
- The dev dashboard and toolbar are reachable from a Docker dev box via `TINA4_DEV_ALLOWED_PEERS`;
24+
a viewer the gate refuses gets no toolbar (#279).
25+
- The database layer accepts the `pgsql://` scheme as an alias of postgres (#280).
26+
- A configurable SMTP timeout is reported as a timeout instead of hanging the request (#278).
27+
1228
## 3.13.148 — 2026-10-05
1329
### Sessions
1430
- An anonymous request no longer stores a session or sets a session cookie when nothing was ever put in it. A request that only marked the session changed without leaving data in it (deleting a key it never had, `clear()`, `regenerate()` on an empty session) is treated the same — a record with no data is not a session. Requests that store a value, or that arrive with a cookie for an already-stored session, behave as before, so session storage no longer grows with anonymous traffic (static files, 404s, health checks). Fixed across all four frameworks.

‎CLAUDE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The full discipline lives in `.claude/skills/tina4-maintainer/SKILL.md`; this bl
1515

1616
# Tina4 Python
1717

18-
Version 3.13.148 - Lightweight Python web framework. See https://tina4.com for full documentation.
18+
Version 3.13.149 - Lightweight Python web framework. See https://tina4.com for full documentation.
1919

2020
## Build & Test
2121

@@ -943,7 +943,7 @@ uv run tina4python test # Discovers @tests in src/**/*.py
943943
- SSE/Streaming via `response.stream()` — Server-Sent Events support for real-time data push. Pass an async generator; framework handles chunked transfer encoding, `text/event-stream` content type, and connection keep-alive
944944
- MCP server (`tina4_python.mcp`): built-in dev tools auto-start when MCP is a capability of the deployment. Developer API: `McpServer`, `@mcp_tool`, `@mcp_resource`. JSON-RPC 2.0 over SSE. **Security is a two-layer gate (v3.13.40):** `is_enabled()` is a pure capability gate (explicit `TINA4_MCP` wins, else `TINA4_DEBUG`; host-independent), and `is_request_allowed(remote_ip, has_valid_token)` authorises each request on the RAW socket peer (`request.remote_ip`, never X-Forwarded-For): loopback always; a remote caller needs `TINA4_MCP_REMOTE=true` AND a token matching `TINA4_MCP_TOKEN` (never `TINA4_API_KEY`, ADR-0078; sent as Authorization Bearer / X-MCP-Token; no configured token means remote is always denied). Every `/__dev` request (reads too), the MCP endpoints and the `/__dev_reload` socket also require a loopback Host (`localhost`, `127.0.0.1`, `[::1]` or `TINA4_HOST`) and refuse `Sec-Fetch-Site: same-site`/`cross-site` (ADR-0078). `/health` omits `version` outside debug. All MCP surfaces (REST shim, JSON-RPC, SSE) 404 a disallowed caller. `database_query` is SELECT/WITH-only and rejects stacked statements; the file tools are sandboxed to the project root. `is_localhost()` is informational only, not the gate. **`TINA4_DEV_ALLOWED_PEERS`** (opt-in, default none) is a comma-separated IP/CIDR allow-list of RAW socket peers (v4/v6, never a forwarded header) admitted to `/__dev` - the documented way to reach the dashboard from a Docker dev box whose requests arrive from the container-network gateway, e.g. `172.16.0.0/12` (#279). `/__dev/toolbar.css` and `/__dev/toolbar.js` are static and always load; a viewer the gate would refuse gets no toolbar injected
945945
- Tests: 6,088 passing, 0 failures, **0 skipped** — measured 2026-09-17 on the lab (Ubuntu 24.04.4 LTS x86_64, Python 3.13.13, live services, `TINA4_REQUIRE_SERVICES=1`, 604s, run as root). **Firebird is NOT excluded.** The lab provisions a live Firebird 5 (`firebirdsql/firebird:5` on :3050, `TINA4_TEST_FIREBIRD_URL`) and those tests run. What IS deliberate is Firebird's absence from the `TINA4_REQUIRE_SERVICES` keyword gate in `tests/conftest.py`: GitHub CI does not provision Firebird, so a Firebird skip has to stay green *there*. Those are two different things and this line used to conflate them into "excluded by design", which read as "the Firebird tests do not run" — they do. **Nothing skips any more.** Reaching 0 skips now also needs the graph engines (Neo4j, Memgraph, ArangoDB, Ultipa, wired via `TINA4_TEST_NEO4J_URL`/`_MEMGRAPH_URL`/`_ARANGO_URL`/`_ULTIPA_URL` + the `graph` extra) and the lab Keycloak OIDC realm (`TINA4_REQUIRE_OIDC=1`), both added after the August baseline; without them `test_graph.py` (Feature 139) and the real OIDC contract test skip. The last skip was `tests/test_session_backend_failure.py` `[needs:no-dac-override]`: the suite runs as root, root holds `CAP_DAC_OVERRIDE`, so a write went straight through a 0400 file and no real `EACCES` was reachable — and as root the second `save()` returned `True`, so that skip was hiding a FAILING assertion, not merely an unrunnable one. The test now stops being root for the length of the failing write (`os.seteuid` to `nobody`; the saved uid stays 0, so a `finally` always restores it) and the kernel raises the genuine errno-13 the test asserts. Two parts of that are load-bearing: the log directory is handed to the same uid, because dropping the uid otherwise denies `Log.error` as well and the EACCES under test goes unrecorded (`_LogWriter.write` swallows `OSError` unless `TINA4_LOG_STRICT`); and the fixture root is its own 0755 `mkdtemp` rather than `tmp_path`, whose 0700 root-owned parents make every denial a directory traversal, which would pass for the wrong reason. Re-measure with `.venv/bin/python -m pytest tests/ -q` and quote the summary line, never the exit code
946-
- Version: 3.13.148
946+
- Version: 3.13.149
947947

948948
## Links
949949

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "tina4-python"
3-
version = "3.13.148"
3+
version = "3.13.149"
44
description = "Tina4 Python v3 — Zero-dependency, lightweight web framework"
55
authors = [
66
{name = "Andre van Zuydam", email = "andrevanzuydam@gmail.com"}

‎tina4_python/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _resolve_version() -> str:
5757
#
5858
# test_version_constant.py now asserts this literal equals the pyproject
5959
# version, so the release bump cannot leave it behind again.
60-
return "3.13.148"
60+
return "3.13.149"
6161

6262

6363
__version__ = _resolve_version()

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)