Files
lancedb/python/CONTRIBUTING.md
52209f10c3 chore!: drop Python 3.10 support (#5172)
Closes #5106.

Python 3.10 reached end of life on 2026-10-01. This raises the minimum
to 3.11, following #2955 for 3.9. It's marked `chore!:` because it's a
breaking change for 3.10 users.

- `python/pyproject.toml`: `requires-python = ">=3.11"`, and the 3.10
classifier is removed. The `pillow` lower bound in the `clip`, `siglip`
and `embeddings` extras goes up to `>=13.0.0`, the release with the CVE
fixes, which needs 3.11+. The `typing-extensions; python_version <
"3.11"` dev dependency is removed, since it no longer applies.
- `python/Cargo.toml`: pyo3 `abi3-py310` becomes `abi3-py311`, so wheels
are built as `cp311-abi3`.
- `python/lancedb/query.py`: `Self` comes from `typing`, without the
`typing_extensions` fallback.
- CI: the Linux test matrix goes from `["10", "13"]` to `["11", "13"]`,
and the minimum-dependencies job, the release build (`pypi-publish.yml`)
and the docs build move from 3.10 to 3.11.
- `python/uv.lock`: regenerated with `uv lock --extra-index-url
https://pypi.fury.io/lance-format/`. The only changes are the 3.10-only
resolutions going away: all 74 `python_full_version < '3.11'` markers,
`async-timeout`, `backports-asyncio-runner`, `exceptiongroup`, `tomli`,
and the older numpy, scipy, pandas, pyarrow and pillow pins. No package
version changes for 3.11+.

Checks run locally: `ruff check` and `ruff format --check` pass, and
`cargo metadata` succeeds for the workspace. I haven't run the Python
test suite, which needs the native build, so I'm relying on CI for that.

pylance still declares `>=3.10`. As the issue says, lancedb can move
first because pylance is optional.


![Evidence](https://raw.githubusercontent.com/rahulsjha/lancedb/pr-assets/lance5106-evidence.png)

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:30:18 -08:00

2.3 KiB

Contributing to LanceDB Python

This document outlines the process for contributing to LanceDB Python. For general contribution guidelines, see CONTRIBUTING.md.

Project layout

The Python package is a wrapper around the Rust library, lancedb. We use pyo3 to create the bindings between Rust and Python.

  • src/: Rust bindings source code
  • python/lancedb: Python package source code
  • python/tests: Unit tests

Development environment

To set up your development environment, you will need to install the following:

  1. Python 3.11 or later
  2. Cargo (Rust's package manager). Use rustup to install.
  3. protoc (Protocol Buffers compiler)

Create a virtual environment to work in:

python -m venv venv
source venv/bin/activate
pip install maturin

Commit Hooks

It is highly recommended to install the pre-commit hooks to ensure that your code is formatted correctly and passes basic checks before committing:

make develop # this will install pre-commit itself
pre-commit install

Development

Most common development commands can be run using the Makefile.

Build the package

make develop

Local SQL computed columns and materialized-view creation/refresh are experimental and disabled in published packages. To opt in when building from this directory:

uv run --extra tests --extra dev maturin develop --features experimental-functions --extras tests,dev
uv run --no-sync pytest python/tests -m experimental_functions

Rebuild without --features experimental-functions to test the default package. The tests detect the compiled feature; remote operations, metadata protections, and ordinary eager add_columns transforms remain available in both builds.

Format:

make format

Run tests:

make test
make doctest

Run type checking:

make typecheck

To run a single test, you can use the pytest command directly. Provide the path to the test file, and optionally the test name after ::.

# Single file: test_table.py
pytest -vv python/tests/test_table.py
# Single test: test_basic in test_table.py
pytest -vv python/tests/test_table.py::test_basic

To see all commands, run:

make help