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 70ed7a5 commit 1d0842d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 7 additions & 5 deletions requirements/app/base.txt
@@ -1,4 +1,4 @@
lightning-cloud >=0.5.27
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,17 @@ 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 <=13.0.1
starlette <0.24.0
rich >=12.3.0, <=13.0.1
urllib3 <=1.26.13
uvicorn <=0.17.6
websocket-client <1.5.2
Expand Down
2 changes: 1 addition & 1 deletion requirements/app/test.txt
Expand Up @@ -6,7 +6,7 @@ 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
Expand Down
4 changes: 4 additions & 0 deletions tests/tests_app/components/serve/test_model_inference_api.py
Expand Up @@ -7,6 +7,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 @@ -37,6 +38,9 @@ def target_fn(port, workers):
sys.platform == "win32", reason="requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1"
)
@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 1d0842d

Please sign in to comment.