pin cocoindex>=1.0.7 (fixes #361) + bump to 0.6.7#363
Merged
Conversation
cocoindex added the num_transactions_before_optimize keyword to lancedb.mount_table_target() in 1.0.7 (used by PR #309 to disable the in-flow background optimize that races concurrent table.delete()), but pyproject.toml still pinned cocoindex[lancedb]>=1.0.0a43. Users with an older cocoindex (1.0.0–1.0.6, or a stale copy in a shared env) hit `TypeError: mount_table_target() got an unexpected keyword argument 'num_transactions_before_optimize'` during init/increment. Bump the floor to 1.0.7, the version that introduced the keyword. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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
Fixes #361 —
TypeError: mount_table_target() got an unexpected keyword argument 'num_transactions_before_optimize'duringinit/increment.Root cause
PR #309 added
num_transactions_before_optimize=_NUM_TXN_BEFORE_OPTIMIZEto the threelancedb.mount_table_target(...)calls injava_index_flow_lancedb.pyto disable cocoindex's in-flow backgroundtable.optimize()(which races concurrenttable.delete()→ LanceDB commit conflict, upstream lancedb#1504). That keyword was introduced by cocoindex in 1.0.7, butpyproject.tomlstill pinnedcocoindex[lancedb]>=1.0.0a43,<2. Users resolving an older cocoindex (1.0.0–1.0.6, or a stale copy in a shared env — e.g. the reporter'spy-envs/commonpy3.13) hit theTypeErrorat flow-build time.Fix
Bump the cocoindex floor to 1.0.7 — the version that introduced the keyword (verified via
inspect.signatureon the locally installed 1.0.7).lance_optimize.py(connect_async/table.optimize()) is 1.0.7-era too, so 1.0.7 is the correct floor.Workaround for affected users (no upgrade needed on their side)
Changes
pyproject.toml:cocoindex[lancedb]>=1.0.0a43,<2→>=1.0.7,<2pyproject.toml: version0.6.6→0.6.7User-visible behaviour changes
pip install java-codebase-ragnow pulls cocoindex ≥ 1.0.7, so theinit/incrementTypeErrorno longer reproduces.0.6.7(published from this branch).Validation
.venv/bin/ruff check .— passes.mount_table_targetsignature includesnum_transactions_before_optimize: int = 50.🤖 Generated with Claude Code