Skip to content

pin cocoindex>=1.0.7 (fixes #361) + bump to 0.6.7#363

Merged
HumanBean17 merged 2 commits into
masterfrom
chore/bump-cocoindex-floor
Jul 3, 2026
Merged

pin cocoindex>=1.0.7 (fixes #361) + bump to 0.6.7#363
HumanBean17 merged 2 commits into
masterfrom
chore/bump-cocoindex-floor

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

Summary

Fixes #361TypeError: mount_table_target() got an unexpected keyword argument 'num_transactions_before_optimize' during init / increment.

Root cause

PR #309 added num_transactions_before_optimize=_NUM_TXN_BEFORE_OPTIMIZE to the three lancedb.mount_table_target(...) calls in java_index_flow_lancedb.py to disable cocoindex's in-flow background table.optimize() (which races concurrent table.delete() → LanceDB commit conflict, upstream lancedb#1504). That keyword was introduced by cocoindex in 1.0.7, but pyproject.toml still pinned cocoindex[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's py-envs/common py3.13) hit the TypeError at flow-build time.

Fix

Bump the cocoindex floor to 1.0.7 — the version that introduced the keyword (verified via inspect.signature on 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)

pip install --upgrade "cocoindex[lancedb]>=1.0.7"

Changes

  • pyproject.toml: cocoindex[lancedb]>=1.0.0a43,<2>=1.0.7,<2
  • pyproject.toml: version 0.6.60.6.7

User-visible behaviour changes

  • Fresh pip install java-codebase-rag now pulls cocoindex ≥ 1.0.7, so the init/increment TypeError no longer reproduces.
  • New PyPI release 0.6.7 (published from this branch).

Validation

  • .venv/bin/ruff check . — passes.
  • Confirmed cocoindex 1.0.7's mount_table_target signature includes num_transactions_before_optimize: int = 50.

🤖 Generated with Claude Code

HumanBean17 and others added 2 commits July 3, 2026 22:08
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>
@HumanBean17 HumanBean17 merged commit 9ac7da1 into master Jul 3, 2026
1 check passed
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.

init / increment problem

1 participant