Skip to content

fix: use list_tables() when available, table_names() is deprecated#56

Merged
gordonmurray merged 1 commit into
lance-format:mainfrom
gordonmurray:fix/54-list-tables-fallback
Jun 10, 2026
Merged

fix: use list_tables() when available, table_names() is deprecated#56
gordonmurray merged 1 commit into
lance-format:mainfrom
gordonmurray:fix/54-list-tables-fallback

Conversation

@gordonmurray

@gordonmurray gordonmurray commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Newer lancedb deprecates table_names() in favor of list_tables(), so /datasets was logging a DeprecationWarning on 0.33.0 and will break outright whenever upstream removes the old method. list_tables() returns a ListTablesResponse with the names in .tables.

Because the viewer supports lancedb versions back to 0.3.1 that only have table_names(), this is a fallback rather than a straight replacement: use list_tables() when the connection has it, otherwise table_names().

Test plan

  • Test suite on lancedb 0.33.0: 30 passed, and the table_names deprecation warnings are gone from the pytest output
  • Test suite on lancedb 0.3.1 (fallback path): 30 passed

Fixes #54

Newer lancedb deprecates table_names() in favor of list_tables(),
which returns a ListTablesResponse with the names in .tables. The
viewer supports versions back to 0.3.1 that only have table_names(),
so /datasets picks whichever the connection provides.

Fixes lance-format#54
@gordonmurray gordonmurray merged commit cd3d22e into lance-format:main Jun 10, 2026
14 checks passed
@gordonmurray gordonmurray deleted the fix/54-list-tables-fallback branch June 10, 2026 19:14
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.

fix: table_names() is deprecated, use list_tables() when available

1 participant