Skip to content

Commit

Permalink
turn stub->app pending deprecation warnings into non-pending
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern committed May 1, 2024
1 parent 247c739 commit 23acadd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion modal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,6 @@ def __new__(cls, *args, **kwargs):
(2024, 4, 29),
"The use of \"Stub\" has been deprecated in favor of \"App\"."
" This is a pure name change with no other implications.",
pending=True
)
return _App(*args, **kwargs)

Expand Down
1 change: 0 additions & 1 deletion modal/cli/import_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def get_by_object_path_try_possible_app_names(obj: Any, obj_path: Optional[str])
(2024, 5, 1),
"The symbol `app` is not present but `stub` is. This will not work in future"
" Modal versions. Suggestion: change the name of `stub` to `app`.",
pending=True
)
return stub
else:
Expand Down
4 changes: 2 additions & 2 deletions modal/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,12 @@ async def _interactive_shell(_app: _App, cmd: List[str], environment_name: str =


def _run_stub(*args, **kwargs):
deprecation_warning((2024, 5, 1), "`run_stub` is deprecated. Please use `run_app` instead.", pending=True)
deprecation_warning((2024, 5, 1), "`run_stub` is deprecated. Please use `run_app` instead.")
return _run_app(*args, **kwargs)


def _deploy_stub(*args, **kwargs):
deprecation_warning((2024, 5, 1), "`deploy_stub` is deprecated. Please use `deploy_app` instead.", pending=True)
deprecation_warning((2024, 5, 1), "`deploy_stub` is deprecated. Please use `deploy_app` instead.")
return _deploy_app(*args, **kwargs)


Expand Down
2 changes: 1 addition & 1 deletion modal/serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async def _serve_app(


def _serve_stub(*args, **kwargs):
deprecation_warning((2024, 5, 1), "`serve_stub` is deprecated. Please use `serve_app` instead.", pending=True)
deprecation_warning((2024, 5, 1), "`serve_stub` is deprecated. Please use `serve_app` instead.")
return _run_app(*args, **kwargs)


Expand Down

0 comments on commit 23acadd

Please sign in to comment.