Skip to content

Commit

Permalink
Update fastapi dependency pins (#17173)
Browse files Browse the repository at this point in the history
* Update fastapi dependency pins

* Apply suggestions from code review

* Update test.txt

* Update requirements/app/base.txt

* Revert "Update requirements/app/base.txt"

This reverts commit 59918ff.

* cloud update

* Bad merge

* fastapi 0.69.0 which pins starlette 0.15.0

* pydantic/pydantic#1985

* Avoid CVE: tiangolo/fastapi#3213

* Strict trio

* Skip windows test

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
(cherry picked from commit 04fb30b)
  • Loading branch information
carmocca authored and Borda committed Apr 24, 2023
1 parent 8f3d436 commit 00e0113
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
9 changes: 5 additions & 4 deletions requirements/app/base.txt
@@ -1,4 +1,4 @@
lightning-cloud>=0.5.31
lightning-cloud>=0.5.33
packaging
typing-extensions>=4.0.0, <=4.4.0
deepdiff>=5.7.0, <6.2.4
Expand All @@ -12,15 +12,16 @@ beautifulsoup4>=4.8.0, <4.11.2
inquirer>=2.10.0, <=3.1.2
psutil<5.9.5
click<=8.1.3
fastapi<0.89.0 # strict; TODO: broken serializations

fastapi>=0.69.0,<0.89.0 # strict; TODO: broken serializations
starlette # https://fastapi.tiangolo.com/deployment/versions/#about-starlette
pydantic>=1.7.4,<2.0.0 # https://fastapi.tiangolo.com/deployment/versions/#about-pydantic

dateutils<=0.6.12
Jinja2<=3.1.2
pydantic<=1.10.4
PyYAML<=6.0
requests<2.28.3
rich >=12.3.0, <=13.0.1
starlette<0.24.0
urllib3<=1.26.13
uvicorn<=0.17.6
websocket-client<1.5.2
Expand Down
3 changes: 1 addition & 2 deletions requirements/app/test.txt
Expand Up @@ -6,9 +6,8 @@ pytest-doctestplus>=0.9.0
pytest-asyncio==0.20.3
playwright==1.30.0
httpx
trio<0.22.0
trio<0.22.0 # strict https://github.com/python-trio/trio/pull/2213
pympler
psutil
setuptools<67.7.0
sqlmodel
requests-mock
4 changes: 4 additions & 0 deletions tests/tests_app/components/serve/test_model_inference_api.py
Expand Up @@ -6,6 +6,7 @@
import pytest

from lightning.app.components.serve import serve
from lightning.app.testing.helpers import _RunIf
from lightning.app.utilities.imports import _is_numpy_available, _is_torch_available
from lightning.app.utilities.network import _configure_session, find_free_network_port
from tests_app import _PROJECT_ROOT
Expand Down Expand Up @@ -33,6 +34,9 @@ def target_fn(port, workers):

@pytest.mark.skipif(not (_is_torch_available() and _is_numpy_available()), reason="Missing torch and numpy")
@pytest.mark.parametrize("workers", [0])
# avoid the error: Failed to establish a new connection: [WinError 10061] No connection could be made because the
# target machine actively refused it
@_RunIf(skip_windows=True)
def test_model_inference_api(workers):

port = find_free_network_port()
Expand Down

0 comments on commit 00e0113

Please sign in to comment.