Skip to content

feat: support Python 3.15 - #768

Draft
vishal-bala wants to merge 3 commits into
feat/pre-pr-review-skillfrom
feat/python-3-15-support
Draft

vishal-bala wants to merge 3 commits into
feat/pre-pr-review-skillfrom
feat/python-3-15-support

Conversation

@vishal-bala

@vishal-bala vishal-bala commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Python 3.15.0 is final, but every recent RedisVL release declares Requires-Python >=3.10,<3.15, so pip install redisvl fails on 3.15 (#757). A trial run of the full suite on 3.15.0 found that RedisVL's own code needs no changes. The blockers were the version cap, two locked dependencies that break on 3.15, and torch, which doesn't publish 3.15 wheels on PyPI yet.

Changes

Packaging

  • requires-python is now <3.16. This PR also adds the 3.15 classifier and black's py315 target; the black dev floor rises to 26.5.0, the first release that accepts py315.
  • The mcp extra now floors beartype>=0.23.1. fastmcp pulls beartype in transitively, and releases before 0.23 import typing.no_type_check_decorator, which 3.15 removed. With the old beartype, fastmcp fails to import on 3.15 and the MCP server quietly falls back to its stub. This caused about 70 MCP test failures.

Lock file

  • rpds-py moves 0.30.0 → 2026.9.1, because 0.30.0 has no 3.15 wheel and its source build fails. beartype moves 0.22.9 → 0.23.1.
  • Re-splitting the resolution forks also moves 3.14 onto google-cloud-aiplatform 1.154.0 (from 1.148.1), grpcio 1.84.0 and protobuf 6.33.6. 3.10–3.13 keep grpcio 1.80.0 and protobuf 5.29.6.
  • The lock is now revision 5. uv 0.12.3 still passes uv lock --check on it.

CI

  • 3.15 joins the test and style-check matrices as a blocking leg.
  • On 3.15 only, the install step leaves out the sentence-transformers and all extras, because torch has no cp315 wheels on PyPI. Every other extra still installs.
  • uv moves 0.12.3 → 0.13.1 in all four workflows. 0.13.0 was the first release to ship CPython 3.15.0 final. Its breaking changes don't affect us: every job pins its Python, and the build backend is hatchling.

Tests

  • Tests marked requires_hf now skip when sentence-transformers isn't installed. The marker had been registered but did nothing since 36a5e4d.
  • HF-dependent tests that lacked the marker now carry it.
  • The SemanticRouter repr tests get a stub vectorizer instead, so they still run on 3.15.
  • One assertion matched CPython's TypeError text, which 3.15 reworded from "argument after **" to "Value after **". It now matches both.
  • pytest-asyncio 0.23's deprecation warnings for asyncio.iscoroutinefunction and the event-loop-policy functions are ignored, scoped to the pytest_asyncio module. On 3.15 there were about 9 million per run, which made the suite roughly 19 times slower (about 1000 s against 54 s).

Docs

  • The installation guide and CONTRIBUTING note that sentence-transformers and all can't install on 3.15 yet, and give the uv sync command that leaves them out.

Release Notes

  • Python 3.15 is supported.
  • On 3.15, redisvl[sentence-transformers] and redisvl[all] can't install until PyTorch publishes cp315 wheels on PyPI. Install the individual extras you need instead.
  • pip also refuses the voyageai and sql-redis extras on 3.15, because those packages declare upper bounds below 3.15. uv installs them.
  • redisvl[mcp] now requires beartype>=0.23.1.

Review record

Reviewed at 584740fa by Claude Code (Opus 5.5) with pre-pr-review.
Lenses: correctness (always); security (changes .github/ workflows, dependency floors and the lock file); tests (changes conftest skip logic, test markers and an assertion). Skipped: design (no API change); docs (no docs in the reviewed commit; the docs notes came from a kept finding); Redis behaviour (no command or query building).

  • 5 findings raised, 3 kept after challenge.
  • Fixed:
    • test_different_vector_dtypes needs the HF vectorizer but was unmarked. On 3.15 its bare except turned the ImportError into a "Redis version too low" skip (tests/integration/test_message_history.py:704).
    • The router repr tests were marked requires_hf only because the vectorizer field's default builds HFTextVectorizer. They now pass a stub vectorizer and run on 3.15 (tests/unit/test_repr.py:107, :127).
    • The documented install paths (make install, CONTRIBUTING's uv sync --all-extras, pip install redisvl[all]) fail on 3.15 because of torch. The installation guide and CONTRIBUTING now say so and give the workaround (docs/user_guide/installation.md:59, CONTRIBUTING.md:84).
  • Rejected:
    • Gate the HF skip to 3.15 only, so it can't hide tests elsewhere. Rejected because on 3.10–3.14 CI runs uv sync --all-extras --frozen, which fails the job outright if sentence-transformers is missing, so it can't turn into silent skips.
    • Swap the default vectorizer for a stub in the key-separator and role-filter integration tests. Rejected because that logic doesn't vary by Python version and 3.10–3.14 still cover it; it's an optional refactor.
    • CONTRIBUTING says Python 3.9+, but the floor is 3.10. Rejected as out of scope because it was already wrong before this PR; the author then fixed it anyway in 191df9e9.
  • Open for the reviewer:
    • make install still runs uv sync --all-extras and fails on 3.15. It's documented, not changed.
    • Lift the pytest-asyncio<0.24 pin before 3.16, which removes the APIs it calls. That's a follow-up.
    • Ask upstream to relax voyageai's <3.15 and sql-redis's <3.14 Requires-Python.

Verified:

  • pytest -n auto on 3.15.0, installed as the 3.15 CI leg will be (2496 passed, 281 skipped including 137 HF skips, 0 failed, Redis 8.4).
  • Same on 3.13 with all extras (2633 passed, 144 skipped, 0 failed).
  • After the fixes:
    • tests/unit/test_repr.py on 3.15 and 3.13 (11 passed each);
    • test_different_vector_dtypes (skipped with the HF reason on 3.15, passed on 3.13).
  • isort, black and mypy ./redisvl on 3.15 (no issues).
  • pre-commit run --all-files (passed).
  • uv lock --check with uv 0.12.3 and 0.13.1 (passed).
  • A wheel installed with plain pip into a clean 3.15 venv as redisvl[mcp]. It imports, and the MCP server uses the real fastmcp.
  • On 3.14, the google-genai and vertexai unit tests (33 passed), plus imports of vertexai and aiplatform at the new versions.
  • uv.lock: all 249 added hashes match PyPI.

Later commits: f963b37d (fixes for the three kept findings); 191df9e9 (CONTRIBUTING now says Python 3.10 through 3.15, one line).

Not checked:

  • HF and router tests on 3.15 (they skip there until torch ships cp315 wheels).
  • Cluster tests (they never run in CI).
  • Tests that need API keys, including vertexai on 3.14's new google, grpcio and protobuf versions.
  • pip install of the voyageai and sql-redis extras on 3.15.
  • Windows and Linux. All local runs were on macOS arm64; CI covers Linux.
  • The Sphinx docs build for the new note.
  • The full suite after f963b37d. Only the touched tests were re-run.

Lift the Requires-Python cap to <3.16 and add 3.15 to the classifiers,
black target versions and the test and lint CI matrices.

- Floor beartype at 0.23.1 in the mcp extra. Earlier releases import
  typing.no_type_check_decorator, which 3.15 removed, so fastmcp failed
  to import and the MCP server fell back to its stub.
- Relock: rpds-py 2026.9.1 (0.30.0 cannot build on 3.15) and beartype
  0.23.1. The re-split forks also move 3.14 onto google-cloud-aiplatform
  1.154.0, grpcio 1.84.0 and protobuf 6.33.6.
- Bump uv to 0.13.1, the first line that ships CPython 3.15.0 final.
- torch has no cp315 wheels on PyPI yet, so the 3.15 legs install every
  extra except sentence-transformers and all. Tests marked requires_hf
  now skip when sentence-transformers is not installed, and the HF tests
  that lacked the marker carry it.
- Loosen the ** TypeError assertion; 3.15 reworded the message.
- Ignore pytest-asyncio 0.23's asyncio deprecation warnings. On 3.15
  they number in the millions and slow the suite about twentyfold.
- Mark test_different_vector_dtypes requires_hf. It builds the default HF
  vectorizer, and its bare except turned the ImportError on 3.15 into a
  misleading "Redis version too low" skip.
- Give the SemanticRouter repr tests a stub vectorizer instead of the
  requires_hf marker, so they keep running on 3.15. __repr__ never touches
  the vectorizer; only the field's HFTextVectorizer default needed it.
- Note in the installation guide and CONTRIBUTING that the
  sentence-transformers and all extras cannot install on 3.15 yet, with
  the uv sync command that leaves them out.
@vishal-bala
vishal-bala added this pull request to stack #769 October 16, 2026 10:25
@vishal-bala vishal-bala changed the title feat/python 3 15 support feat: support Python 3.15 Oct 16, 2026
@vishal-bala vishal-bala linked an issue Oct 16, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Python 3.15 support

1 participant