Skip to content

chore: bump pylance to 11.0.0 - #66

Merged
rchowell merged 1 commit into
daft-engine:mainfrom
FANNG1:chore/bump-pylance-11
Sep 15, 2026
Merged

rchowell merged 1 commit into
daft-engine:mainfrom
FANNG1:chore/bump-pylance-11

Conversation

@FANNG1

@FANNG1 FANNG1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • raise the pylance floor from >=8.0.0 to >=11.0.0 and relock to 11.0.0
  • keep lance-namespace at 0.8.6: pylance 11 requires >=0.8.5,<0.9
  • update tests for two behavior changes in Lance 9–11; no daft_lance source changes are needed

Lance changes that affect daft-lance

Lance change Effect here
lance#8017: zone maps support all data types test_build_distributed_index_zonemap_invalid_string_column expected ZONEMAP on a string column to fail. It now builds, so the test is renamed to ..._zonemap_string_column and asserts the index is created.
lance#7903: blob APIs keep null selections LanceDataset.take_blobs returns Optional[BlobFile] and keeps results aligned with the requested row ids, so test_lancedb_write_blob now narrows the Optional. As a side effect, daft_lance.take_blobs no longer fails on null blobs (on pylance 8 it failed with a length mismatch). A regression test for that will come with the #65 fix.

I also checked these breaking changes against daft-lance and they need no changes:

  • lance#8206: fragment ids are no longer reused across an overwrite. The sink's Overwrite commits freshly written fragments without deletion files, and insert_overwrite commits an Update.
  • lance#8235: new max_source_rows / max_source_bytes compaction options. These are only additions.
  • lance#7778: compaction remapper. This only changes a Rust trait.
  • lance#7512: FTS v2 is the default index format. It is covered by the distributed and segmented INVERTED/FTS tests.

Lockfile

The committed uv.lock uses a compact style that no uv lock version writes, so relocking would reformat the entire file (about 1.3k lines). I resolved with uv lock --upgrade-package pylance (uv 0.11.2, the version pinned by the pre-commit uv-lock hook) and copied only the changed pylance and daft-lance entries into the existing file. The result is semantically identical to uv's output, and uv lock --check passes.

Validation

  • native runner: 372 passed, 5 skipped, 2 xfailed, 2 xpassed
  • Ray runner (DAFT_RUNNER=ray, ray 2.55.1): 368 passed. The 4 failures are all take_blobs tests failing with cannot pickle 'builtins.LanceBlobFile' object. They fail the same way on pylance 8.0.0 and are tracked in take_blobs fails on the Ray runner: LanceBlobFile is not picklable #65.
  • mypy: same errors as on pylance 8.0.0, none new (the existing strict-mode errors are unchanged)
  • ruff format --check and ruff check: pass

https://claude.ai/code/session_017ZCLiXSVbAbtEV7z8smf8D

- Raise the pylance floor from 8.0.0 to 11.0.0 and relock (lance-namespace
  stays at 0.8.6, within pylance 11's <0.9 cap).
- ZONEMAP now supports all column types (lance#8017), so the string-column
  test asserts the index is built instead of expecting a failure.
- take_blobs returns Optional[BlobFile] (lance#7903); narrow the type in the
  write test.

Claude-Session: https://claude.ai/code/session_017ZCLiXSVbAbtEV7z8smf8D
@FANNG1
FANNG1 force-pushed the chore/bump-pylance-11 branch from d21129a to 23968ce Compare September 11, 2026 02:43
@FANNG1

FANNG1 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

@universalmind303 @rchowell could you help to review this PR? thanks!

@rchowell
rchowell merged commit 7e0599c into daft-engine:main Sep 15, 2026
5 checks passed
@FANNG1
FANNG1 deleted the chore/bump-pylance-11 branch September 16, 2026 01:16
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.

2 participants