Repository navigation
refactor: drop pylance version checks from indexing and search - #5304
Open
jonasdedden wants to merge 1 commit into
Open
jonasdedden wants to merge 1 commit into
jonasdedden wants to merge 1 commit into
Conversation
pylance 12 is now the minimum, so the guards for older releases are dead: - index: remove the `pylance >= 0.36.0` checks (`_check_pylance_version` and its inline twin in `create_scalar_index`), the `merge_index_metadata_compat` wrapper whose one-argument fallback is never taken, and the `hasattr` guards around `dataset.optimize.optimize_indices`. - search: remove the `index_segments` signature probing and the `initial_storage_options` / `fragment_id` fallbacks. - tests: remove the 0.36/0.37 version gates, the "not yet implemented" skip branches, the always-skipped missing-`optimize` test, and the redundant asserts on `optimize_indices`' typed return value. The index module stub now provides `lance.bitmap` instead of a fake `lance.__version__`.
jonasdedden
force-pushed
the
refactor/pylance-12-index-search-checks
branch
from
October 24, 2026 20:49
d137d2f to
75b4ef8
Compare
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.
Summary
Part 2/3 of splitting up #5301. Now that #5295 made
pylance>=12.0.0the minimum, this removes the pylance version guards from indexing and search.index.py:pylance >= 0.36.0checks:_check_pylance_versionand the inline copy increate_scalar_index.merge_index_metadata_compat. Its one-argumentmerge_index_metadatafallback is never used, so we callmerge_index_metadatadirectly.hasattrguards arounddataset.optimize.optimize_indices.search.py: removed theindex_segmentssignature probing and theinitial_storage_options/fragment_idfallbacks.optimizetest, which is always skipped on supported versions.optimize_indices.test_vector_index_options.pynow provideslance.bitmap, whichindex.pyimports, instead of a fakelance.__version__.Compatibility
lance_ray.RuntimeErrors raised on pylance versions thatpyproject.tomlno longer allows.pyproject.tomlanduv.lockare untouched.Testing
uv run mypy(strict),ruff check,ruff format --check: cleanpyteston this branch (test_distributed_indexing,test_distributed_search,test_vector_index_options): 110 passed, 0 skipped