Skip to content

Commit

Permalink
Drop starsessions from App's requirements (#18470)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: Jirka <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit 369b990)
  • Loading branch information
dependabot[bot] authored and lantiga committed Dec 20, 2023
1 parent a8c40ae commit 18019b4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion requirements/app/app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ lightning-cloud == 0.5.57 # Must be pinned to ensure compatibility
packaging
typing-extensions >=4.0.0, <4.8.0
deepdiff >=5.7.0, <6.6.0
starsessions >=1.2.1, <2.0 # strict
fsspec[http] >=2022.5.0, <2023.11.0
croniter >=1.3.0, <1.5.0 # strict; TODO: for now until we find something more robust.
traitlets >=5.3.0, <5.10.0
Expand Down
12 changes: 0 additions & 12 deletions src/lightning/app/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@
from lightning.app.utilities.cloud import is_running_in_cloud
from lightning.app.utilities.component import _context
from lightning.app.utilities.enum import ComponentContext, OpenAPITags
from lightning.app.utilities.imports import _is_starsessions_available

if _is_starsessions_available():
from starsessions import SessionMiddleware
else:

class SessionMiddleware: # type: ignore[no-redef]
pass


# TODO: fixed uuid for now, it will come from the FastAPI session
TEST_SESSION_UUID = "1234"
Expand Down Expand Up @@ -175,9 +166,6 @@ class StateUpdate(BaseModel):
allow_headers=["*"],
)

if _is_starsessions_available():
fastapi_service.add_middleware(SessionMiddleware, secret_key="secret", autoload=True) # noqa: S106


# General sequence is:
# * an update is generated in the UI
Expand Down
4 changes: 0 additions & 4 deletions src/lightning/app/utilities/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ def _is_streamlit_tensorboard_available() -> bool:
return module_available("streamlit_tensorboard")


def _is_starsessions_available() -> bool:
return module_available("starsessions")


def _is_gradio_available() -> bool:
return module_available("gradio")

Expand Down

0 comments on commit 18019b4

Please sign in to comment.