Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve Backward compatibility in 0.8.0 for #1144 #1151

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

sungwy
Copy link
Collaborator

@sungwy sungwy commented Sep 9, 2024

In #1144, we moved 'public' classes and functions to submodules.

Although 'public' by naming convention, these classes and functions are meant for internal use. The current lack of explicit external API declarations makes it difficult to communicate with our end-users, which classes and functions we are intending to support for external use. (#1099)

The classes that were moved and are not referenced as an import in pyiceberg.table module are as follows:

  • Move
  • MoveOperation
  • DeleteFiles
  • FastAppendFiles
  • MergeAppendFiles
  • OverwriteFiles
  • UpdateTableMetadata

UpdateTableMetadata is an abstract base class, and hence cannot be used directly.

This PR proposed to rename these as 'private' classes with single underscore prefix, and introduces functions that return these classes with a deprecation warning. This will allow users who are for some reason using these classes to see the warnings and update their code to not use these classes anymore.

Thanks @kevinjqliu for flagging this as a potential issue for backward compatibility.

@sungwy sungwy requested a review from kevinjqliu September 9, 2024 21:48
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! It's a bit tedious but is helpful to transition the code to deprecation path.

@sungwy sungwy merged commit 1d4ed06 into apache:main Sep 13, 2024
8 checks passed
@sungwy sungwy deleted the sy-table-refactor-2 branch September 13, 2024 00:07
sungwy added a commit to sungwy/iceberg-python that referenced this pull request Dec 7, 2024
sungwy added a commit to sungwy/iceberg-python that referenced this pull request Dec 7, 2024
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