Repository navigation
build(python)!: stop requiring pylance at runtime - #154
Merged
Merged
Conversation
The engine reads Lance through its own Lance 13 Rust library and only touches pylance to recognise a LanceDataset handle, which degrades gracefully when pylance is absent. The `pylance>=13,<14` pin forced resolver conflicts on users of pylance 14 without protecting anything, since datasets can be written by any Lance-bundling tool. pylance moves to the dev group (now locked at 14.0.2), the wheel smoke test installs it explicitly, and the docs tell users to add it next to lance-csr to write datasets or open them on disk.
Deploying lance-csr with
|
| Latest commit: |
71c5a9a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://143c675a.lance-csr.pages.dev |
| Branch Preview URL: | https://deps-drop-pylance.lance-csr.pages.dev |
prrao87
added a commit
that referenced
this pull request
Nov 14, 2026
Minor bump: #154 (build(python)!) stops requiring pylance at runtime, which changes the Python package's dependencies.
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.
Why
lance-csr pinned
pylance>=13.0.0,<14as a runtime dependency, but the engine doesn't read data through pylance. It reads every Lance dataset with the Lance 13 Rust crate it links, the same way LanceDB does. pylance only shows up in three places:LanceDataset, then reopens it in Rust by URI, version and storage options;use_lance_indexvector path on a one-shotCypherQuerycallsto_table(nearest=...)on the dataset the caller passed;TYPE_CHECKINGor in.pyistubs.All three only apply when the caller already holds a pylance object. Without pylance, the
LanceDatasetcheck returns false and every query takes the Arrow path.The pin's stated reason was that other pylance majors might write files Lance 13 can't read. It doesn't prevent that, because datasets can be written by LanceDB or any other tool that bundles its own Lance. What it does do is make installs fail for anyone who also needs pylance 14, which is the current release.
What changed
devgroup with no upper bound and is now locked at 14.0.2, so the test suite writes data with pylance 14 and reads it with Lance 13.uv add lance-csr pylance) to write datasets or open them on disk. It says that pylance 13 and 14 both write file format 2.2 by default, and that a dataset in a newer format than Lance 13 knows fails to open with an error. The "use pylance 13.x" warning is gone, and the getting-started page, both READMEs and the snapshots example are updated to match.Breaking:
uv add lance-csrno longer installs pylance. Code that callsimport lancewithout declaring pylance as its own dependency will hit anImportErrorafter upgrading. The fix isuv add pylance.Validation
make testpasses with pylance 14.0.2: 1722 tests.pytest python/testspasses with pylance 13.0.0 layered in throughuv run --with: 1718 tests (the four doctests aren't collected in this run).import lancemade to fail (sys.modules["lance"] = None), aCypherEnginetwo-hop CSR query,VectorSearchwithuse_lance_index(True), andSqlEngineall return the expected results.make lint,docs/check_snippets.py,zensical build --strict,typos1.51.1,zizmor1.32.0 andcargo fmt --checkare clean.🤖 Generated with Claude Code