Repository navigation
refactor(python): drop Python 3.10 support - #810
Merged
Merged
Conversation
This was referenced Nov 2, 2026
Make Python 3.11 the minimum supported version. Python 3.10 reached end of life in October 2026, and its share of redisvl downloads has fallen to about 1%. - pyproject.toml: requires-python >=3.11,<3.16, drop the 3.10 classifier and black's py310 target - CI: remove 3.10 from the lint and test matrices - uv.lock: re-lock without upgrades, removing the python < 3.11 fork - Use typing.Self instead of typing_extensions.Self, and for methods that return their own class - Drop the dead sys.version_info monkeypatching in the MCP CLI tests - Docs: state 3.11 as the minimum
vishal-bala
force-pushed
the
refactor/drop-python-3-10
branch
from
November 3, 2026 12:08
61effbf to
0d6c0ce
Compare
vishal-bala
marked this pull request as ready for review
November 3, 2026 12:09
…refactor/drop-python-3-10 # Conflicts: # uv.lock
importlib.metadata has been in the standard library since 3.8, and importlib_metadata was never a declared dependency, so the fallback branch could only ever raise.
limjoobin
approved these changes
Nov 11, 2026
limjoobin
left a comment
Contributor
There was a problem hiding this comment.
LGTM. This PR removes the Python 3.10 support, which is consistent across packaging, CI, docs, typing, and the lockfile.
One non-blocking process note: please refresh the Reviewer Brief against the current head before merging.
|
🚀 PR was released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Python 3.10 reached end of life in October 2026, and its share of redisvl downloads has fallen from 6.2% in April 2026 to 1.1% in October 2026 (pypistats.org). The 3.9 drop in #587 shipped at 0.5%. Raising the floor to 3.11 removes a whole resolution fork from the lockfile and lets follow-up work use 3.11-only features such as
enum.StrEnum,asyncio.timeoutandasyncio.TaskGroup.Changes
Support floor
pyproject.tomlnow declaresrequires-python = ">=3.11,<3.16", drops the 3.10 classifier and removespy310from black's target versions. The lint and test matrices in.github/workflows/start at 3.11; the single-version jobs already ran on 3.11 and are unchanged.Lockfile
uv.lockwas re-locked withuv lockand no upgrade flags. Thepython_full_version < '3.11'fork is gone, taking 31 package versions that only 3.10 installed with it (numpy 2.2.6, scipy 1.15.3, torch 2.14.1, the CUDA 13.0 wheels, tomli and others). No new package version enters the lock. One resolution moves: Python 3.13 now resolves protobuf 6.33.6, grpcio 1.85.1 and grpcio-status 1.85.1, the versions 3.14 and 3.15 already used, instead of 5.29.6, 1.80.0 and 1.71.2. Nothing changes for 3.11, 3.12, 3.14 or 3.15.exceptiongroupandasync-timeoutstay, becausefastmcp-slimneeds the first on every version and redis-py needs the second below 3.11.3.typing.SelfSelfnow comes fromtypingrather thantyping_extensions, which was never a declared dependency. Methods that return their own class are annotated-> Self: the alternative constructors onIndexSchema,SemanticRouter,MCPSettings,BackupHeader,VectorBackupandMultiWorkerBackupManifest; the pydanticmodel_validator(mode="after")methods inredisvl/mcp/config.pyandredisvl/migration/models.py; andBaseQuery.sort_byandBaseQuery.query. Runtime behaviour is unchanged. Type checkers now infer the subclass in chains such asVectorQuery(...).sort_by(...).Minor changes
tests/unit/test_cli_mcp.pydrops itssys.version_infomonkeypatching, which has been dead since the 3.9 drop removed the version check inredisvl/cli/mcp.py.redisvl/version.pydrops its Python 3.7 fallback toimportlib_metadata, a package RedisVL never declared, so the branch could only raise.docs/user_guide/installation.md,docs/user_guide/how_to_guides/mcp.mdand the LangCache notebook state 3.11 as the minimum.Notes
This PR builds on #768 (Python 3.15 support), now merged, and targets
main. Python 3.10 is dropped without a deprecation release, as 3.9 was.Release Notes
Python 3.10 is no longer supported; RedisVL now requires Python 3.11 or later. Installs on Python 3.10 resolve to the last release that supported it.
Reviewer Brief
Start here:
uv.lock. The re-lock is the only part of the change that alters what CI and contributors install (published installs resolve frompyproject.toml, not the lock), and its one effect beyond removing 3.10 is that Python 3.13 moves to protobuf 6.33.6 and grpcio 1.85.1.Where it could fail
redisvl[vertexai]orredisvl[all]: protobuf 6 on 3.13 is new, though 3.14 and 3.15 already run it; check that the Vertex AI vectorizer has no protobuf<6 assumption.redisvl/query/query.py:139:BaseQuery.sort_bynow returnsSelf, so a subclass that overrides it with a narrower return type would now fail type-checking; none exists today.Not verified: live provider APIs on 3.13, where Vertex AI now runs under protobuf 6 (CI's Service Tests run them on 3.11 only); cluster tests; Python 3.11.0 to 3.11.2, where redis-py still pulls in
async-timeout.Beyond CI: a per-version parse of the old and new lockfiles shows the protobuf/grpc move on 3.13 is the only version change for 3.11 and later.
Reviewed
036e323f(rebased ontomainfromfdf0b578, withuv.lockre-locked againstmain's), fixes in0d6c0ce1· Claude Code (claude-opus-5-5) · lenses: correctness, security, design, tests, docs, Redis behaviourNote
Medium Risk
Breaking change for Python 3.10 users; dependency lockfile shifts (e.g. protobuf/grpc on 3.13) may affect optional Google/Vertex stacks though runtime behavior is mostly typing and packaging.
Overview
RedisVL now requires Python 3.11+.
pyproject.tomlraisesrequires-python, drops the 3.10 Trove classifier, and removespy310from Black's targets; lint and test CI matrices no longer run 3.10. User-facing docs (README, CONTRIBUTING, installation, MCP, LangCache notebook) state the new floor.Return types move to stdlib
typing.Selfon factory methods, Pydanticmodel_validators, and fluent query APIs (SemanticRouter, MCP config models, migration backup types,IndexSchema,BaseQuery, etc.), replacing quoted class names andtyping_extensions.Selfwhere it appeared.Housekeeping:
redisvl/version.pyalways usesimportlib.metadata(no pre-3.8 fallback); MCP CLI unit tests no longer mocksys.version_infoafter the runtime version gate was removed.Reviewed by Cursor Bugbot for commit f0048fb. Bugbot is set up for automated code reviews on this repo. Configure here.