diff --git a/runhouse/resources/functions/aws_lambda.py b/runhouse/resources/functions/aws_lambda.py index 77bc60281..0fdd70960 100644 --- a/runhouse/resources/functions/aws_lambda.py +++ b/runhouse/resources/functions/aws_lambda.py @@ -686,9 +686,6 @@ def to( self, env: Optional[List[str]] = [], cloud: str = "aws_lambda", - # Variables below are deprecated - reqs: Optional[List[str]] = None, - setup_cmds: Optional[List[str]] = [], force_install: Optional[bool] = False, ): """ diff --git a/runhouse/resources/functions/function_factory.py b/runhouse/resources/functions/function_factory.py index 83f96ab03..71614d050 100644 --- a/runhouse/resources/functions/function_factory.py +++ b/runhouse/resources/functions/function_factory.py @@ -1,6 +1,5 @@ import logging import re -import warnings from pathlib import Path from typing import Callable, List, Optional, Union @@ -20,8 +19,6 @@ def function( dryrun: bool = False, load_secrets: bool = False, serialize_notebook_fn: bool = False, - reqs: Optional[List[str]] = None, # deprecated - setup_cmds: Optional[List[str]] = None, # deprecated ): """runhouse.function(fn: str | Callable | None = None, name: str | None = None, system: str | Cluster | None = None, env: str | List[str] | Env | None = None, dryrun: bool = False, load_secrets: bool = False, serialize_notebook_fn: bool = False) @@ -64,19 +61,7 @@ def function( # Try reloading existing function return Function.from_name(name, dryrun) - if setup_cmds: - warnings.warn( - "``setup_cmds`` argument has been deprecated. " - "Please pass in setup commands to rh.Env corresponding to the function instead." - ) - if reqs is not None: - warnings.warn( - "``reqs`` argument has been deprecated. Please use ``env`` instead." - ) - env = Env( - reqs=reqs, setup_cmds=setup_cmds, working_dir="./", name=Env.DEFAULT_NAME - ) - elif not isinstance(env, Env): + if not isinstance(env, Env): env = _get_env_from(env) or Env(working_dir="./", name=Env.DEFAULT_NAME) fn_pointers = None diff --git a/runhouse/resources/hardware/cluster.py b/runhouse/resources/hardware/cluster.py index 529af302e..763037cff 100644 --- a/runhouse/resources/hardware/cluster.py +++ b/runhouse/resources/hardware/cluster.py @@ -1435,8 +1435,6 @@ def share( visibility: Optional[Union[ResourceVisibility, str]] = None, notify_users: bool = True, headers: Optional[Dict] = None, - # Deprecated - access_type: Union[ResourceAccess, str] = None, ) -> Tuple[Dict[str, ResourceAccess], Dict[str, ResourceAccess]]: # save cluster and creds if not saved @@ -1452,7 +1450,6 @@ def share( visibility=visibility, notify_users=notify_users, headers=headers, - access_type=access_type, ) # share cluster @@ -1462,7 +1459,6 @@ def share( visibility=visibility, notify_users=notify_users, headers=headers, - access_type=access_type, ) @classmethod diff --git a/runhouse/resources/resource.py b/runhouse/resources/resource.py index be52e5c33..474150c6f 100644 --- a/runhouse/resources/resource.py +++ b/runhouse/resources/resource.py @@ -2,7 +2,6 @@ import pprint import sys -import warnings from enum import Enum from pathlib import Path from typing import Dict, List, Optional, Tuple, Union @@ -366,8 +365,6 @@ def share( visibility: Optional[Union[ResourceVisibility, str]] = None, notify_users: bool = True, headers: Optional[Dict] = None, - # Deprecated - access_type: Union[ResourceAccess, str] = None, ) -> Tuple[Dict[str, ResourceAccess], Dict[str, ResourceAccess]]: """Grant access to the resource for a list of users (or a single user). If a user has a Runhouse account they will receive an email notifying them of their new access. If the user does not have a Runhouse account they will @@ -438,10 +435,6 @@ def share( f"For example: `{self.name}.to(system='s3')`" ) - if access_type is not None: - warnings.warn("`access_type` is deprecated, please use `access_level`") - access_level = access_type - if isinstance(access_level, str): access_level = ResourceAccess(access_level) diff --git a/runhouse/rns/top_level_rns_fns.py b/runhouse/rns/top_level_rns_fns.py index 281972822..fd62d8d19 100644 --- a/runhouse/rns/top_level_rns_fns.py +++ b/runhouse/rns/top_level_rns_fns.py @@ -160,60 +160,3 @@ def ipython(): def delete(resource_or_name: str): """Delete the resource from the RNS or local config store.""" rns_client.delete_configs(resource=resource_or_name) - - -# ----------------- Pinning objects to cluster memory ----------------- -from runhouse import globals - - -def pin_to_memory(key: str, value): - # Deprecate after 0.0.12 - import warnings - - warnings.warn( - "pin_to_memory is deprecated, use `rh.here.put` instead", DeprecationWarning - ) - rh_config.obj_store.put(key, value) - - -def get_pinned_object(key: str, default=None): - # Deprecate after 0.0.12 - import warnings - - warnings.warn( - "get_pinned_object is deprecated, use `rh.here.get` instead", DeprecationWarning - ) - return rh_config.obj_store.get(key, default=default) - - -def remove_pinned_object(key: str): - # Deprecate after 0.0.12 - import warnings - - warnings.warn( - "remove_pinned_object is deprecated, use `rh.here.delete` instead", - DeprecationWarning, - ) - globals.obj_store.delete(key) - - -def pinned_keys(): - # Deprecate after 0.0.12 - import warnings - - warnings.warn( - "pinned_keys is deprecated, use `rh.here.keys` instead", - DeprecationWarning, - ) - return globals.obj_store.keys() - - -def clear_pinned_memory(): - # Deprecate after 0.0.12 - import warnings - - warnings.warn( - "clear_pinned_memory is deprecated, use `rh.here.clear` instead", - DeprecationWarning, - ) - globals.obj_store.clear()