Skip to content

refactor(python): drop Python 3.9 support#587

Draft
vishal-bala wants to merge 3 commits intomainfrom
drop-python39
Draft

refactor(python): drop Python 3.9 support#587
vishal-bala wants to merge 3 commits intomainfrom
drop-python39

Conversation

@vishal-bala
Copy link
Copy Markdown
Collaborator

@vishal-bala vishal-bala commented Apr 17, 2026

Summary

This PR drops Python 3.9 support from RedisVL and makes Python 3.10 the project minimum. That change is carried through package metadata, the lockfile, CI configuration, repo-owned documentation, and the codebase’s type annotations so the stated support policy and the implementation match.

Motivation

Supporting Python 3.9 was already imposing ongoing cost in a few different ways. It required extra compatibility handling, kept the project split between core-package and MCP-specific runtime messaging, and forced older annotation syntax across large parts of the repository. Python 3.9 is also past its official end-of-life, so continuing to carry support for it no longer has a strong maintenance or ecosystem justification. The project already targets newer runtimes in practice, which makes keeping 3.9 mostly maintenance overhead.

Changes

The support-floor change starts in packaging and CI. pyproject.toml, uv.lock, and the GitHub Actions workflows now treat Python 3.10 as the minimum supported version, while preserving current newer-runtime coverage, including Python 3.14 in lint and test configuration. This aligns the declared support policy with the environments the project is expected to run and validate against.

The library code has also been updated to use Python 3.10-native typing syntax throughout repo-owned Python sources. Legacy typing container aliases and Optional/Union forms were replaced with built-in generics and | unions where valid, while runtime-sensitive sites were adjusted manually so forward references, type checks, and schema/type-introspection behavior remain valid without adding from __future__ import annotations.

Additional follow-up changes include:

  • Moving Annotated imports to the standard library where supported
  • Keeping typing_extensions.Self in place where it is still required for Python 3.10 compatibility
  • Removing the redundant MCP CLI runtime guard that duplicated the package-level Python requirement
  • Updating README content, installation guidance, MCP docs, notebook prose, and tests that assert exact type-hint shapes so they align with the new support floor and modernized annotations

Note for Reviewers

The docs build still reports existing Sphinx warnings that are unrelated to this PR.

Testing

The following checks were run during development:

  • make check-sort-imports
  • make check-format
  • make check-types
  • uv run python -m tests.test_imports redisvl
  • uv run python -m pytest tests/unit/test_validation.py tests/unit/test_index_schema_type_issue.py tests/unit/test_base_vectorizer.py tests/unit/test_cli_utils.py tests/unit/test_hybrid_types.py tests/unit/test_mcp/test_search_tool_unit.py tests/unit/test_mcp/test_upsert_tool_unit.py tests/integration/test_mcp/test_server_startup.py tests/integration/test_mcp/test_upsert_tool.py -q
  • make docs-build

@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Apr 17, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

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.

1 participant