Skip to content

fix: restore CreateEmptyTable deprecated shims for backwards compatibility#333

Open
LuciferYang wants to merge 1 commit intolance-format:mainfrom
LuciferYang:fix-restore-deprecated-create-empty-table-shims
Open

fix: restore CreateEmptyTable deprecated shims for backwards compatibility#333
LuciferYang wants to merge 1 commit intolance-format:mainfrom
LuciferYang:fix-restore-deprecated-create-empty-table-shims

Conversation

@LuciferYang
Copy link
Copy Markdown

Summary

Restore CreateEmptyTableRequest / CreateEmptyTableResponse as deprecated aliases and restore the create_empty_table() method with a DeprecationWarning, to unbreak previously-released pylance wheels.

Problem

v0.7.0 (#330) removed these symbols entirely. Released pylance wheels (2.0.1, 4.0.0b1, etc.) do:

from lance_namespace import CreateEmptyTableRequest, CreateEmptyTableResponse, ...

With lance-namespace>=0.7.0 installed, import lance fails with ImportError.

Downstream workarounds:

Fix

Three minimal changes to python/lance_namespace/lance_namespace/__init__.py:

  1. Deprecated aliasesCreateEmptyTableRequest = CreateTableRequest / CreateEmptyTableResponse = CreateTableResponse with a comment explaining they will be removed in a future release
  2. __all__ updated — re-export both symbols
  3. create_empty_table() method restored — with DeprecationWarning directing users to declare_table() instead

This matches the deprecation approach already used in v0.6.1 and gives downstreams a migration window before final removal.

Test plan

  • from lance_namespace import CreateEmptyTableRequest, CreateEmptyTableResponse succeeds
  • Old pylance wheels (pip install pylance==2.0.1) can import lance without error
  • Existing tests remain green

Closes #331

…ility

v0.7.0 removed CreateEmptyTableRequest/CreateEmptyTableResponse and the
create_empty_table() method, breaking all previously-released pylance
wheels (e.g. 2.0.1, 4.0.0b1) that import these symbols.

Restore them as deprecated aliases pointing to CreateTableRequest/
CreateTableResponse, and restore the create_empty_table() method with a
DeprecationWarning directing users to declare_table() instead.

This matches the deprecation approach already used in v0.6.1 and gives
downstreams a migration window before final removal.

Closes lance-format#331
@github-actions github-actions Bot added bug Something isn't working python Python features labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Python features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.7.0 silently breaks previously-released Lance wheels via transitive dep resolution

1 participant