Skip to content

Commit

Permalink
remove DeprecatedConstants
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Dec 7, 2024
1 parent 99a7840 commit d4d9c79
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions pyiceberg/cli/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,9 @@
from pyiceberg.exceptions import NoSuchNamespaceError, NoSuchPropertyException, NoSuchTableError
from pyiceberg.table import TableProperties
from pyiceberg.table.refs import SnapshotRef
from pyiceberg.utils.deprecated import deprecated
from pyiceberg.utils.properties import property_as_int


class DeprecatedConstants:
@property
@deprecated(
deprecated_in="0.8.0",
removed_in="0.9.0",
help_message="DEFAULT_MAX_SNAPSHOT_AGE_MS is deprecated. Use TableProperties.MAX_SNAPSHOT_AGE_MS_DEFAULT instead.",
)
def DEFAULT_MAX_SNAPSHOT_AGE_MS(self) -> int:
return 432000000

@property
@deprecated(
deprecated_in="0.8.0",
removed_in="0.9.0",
help_message="DEFAULT_MIN_SNAPSHOTS_TO_KEEP is deprecated. Use TableProperties.MIN_SNAPSHOTS_TO_KEEP_DEFAULT instead.",
)
def DEFAULT_MIN_SNAPSHOTS_TO_KEEP(self) -> int:
return 1


DEFAULT_MIN_SNAPSHOTS_TO_KEEP = DeprecatedConstants().DEFAULT_MIN_SNAPSHOTS_TO_KEEP
DEFAULT_MAX_SNAPSHOT_AGE_MS = DeprecatedConstants().DEFAULT_MAX_SNAPSHOT_AGE_MS


def catch_exception() -> Callable: # type: ignore
def decorator(func: Callable) -> Callable: # type: ignore
@wraps(func)
Expand Down

0 comments on commit d4d9c79

Please sign in to comment.