Files
vectorize-io__hindsight/docker
Nicolò Boschi 6f441b0aeb revert: drop free-threaded CPython 3.14 support (#4037, #4067) (#4234)
Load testing did not justify the maintenance cost of the -py3.14t target, so
this removes it and the multi-loop server built on top of it.

Removed outright:

- `hindsight_api/_free_threading.py` and `HINDSIGHT_API_FREE_THREADING` — the
  guard that turned CPython's GIL-re-enable RuntimeWarning into an error.
- `docker/standalone/Dockerfile.freethreaded`, `docker/freethreaded-smoke.sh`,
  the `test-api (free-threaded 3.14)` CI job, and the `-py3.14t` release image
  (including its `latest=false` carve-out in the image metadata step).
- `multi_loop.py`, `HINDSIGHT_API_EVENT_LOOPS` / `--event-loops`, and
  `_serve_multi_loop`. Several event loops in one process is only a throughput
  win without the GIL; on a stock build the loops take turns, which `main.py`
  already warned about.

Multi-loop hooks reverted with it: `run_background_tasks` on MemoryEngine and
both `create_app`s, `LLMTraceRecorder.bind_loop` and its per-loop filter, and —
from the #4123 follow-up — `ExtensionContext.is_primary` plus the thread-local
context in `Extension`. With one loop per process the flag is permanently True
and only one context is ever set, so both were dead weight on a public
extension interface.

`HINDSIGHT_API_MIGRATION_ISOLATION` loses its `auto` mode and now defaults to
`false`. `auto` isolated only on a free-threaded interpreter, so this changes
nothing for any existing deployment; `true`/`false` still force it either way.

Kept, because they are real races that threads hit under the GIL too and only
their rationale was free-threading-specific: the dateparser lock and the
`regex>=2026.9.3` floor, one TEI HTTP client per thread, the shared bounded
embeddings request pool, `bank_stats_cache`'s per-loop coalescing, and
`_cross_loop.py` (still used by llm_wrapper, cross_encoder and llamacpp_llm).
Their comments now stand on plain thread/loop-safety grounds.

Ordinary Python 3.14 is untouched: the `build-api-python-versions` matrix still
covers 3.11-3.14 and the litellm >=1.93.0 cp314 floor stays.

Verified: lint.sh, ty, and the deterministic suite (8645 passed). OpenAPI and
the generated clients show no drift, and the two .env.example copies stay
byte-identical.
2026-09-09 10:30:09 +02:00
..