Skip to content

Commit 04fb30b

Browse files
carmoccaBorda
andauthored
Update fastapi dependency pins (#17173)
* 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: fastapi/fastapi#3213 * Strict trio * Skip windows test --------- Co-authored-by: Jirka Borovec <[email protected]>
1 parent 472333c commit 04fb30b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

requirements/app/base.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lightning-cloud>=0.5.31
1+
lightning-cloud>=0.5.33
22
packaging
33
typing-extensions>=4.0.0, <=4.4.0
44
deepdiff>=5.7.0, <6.2.4
@@ -12,15 +12,16 @@ beautifulsoup4>=4.8.0, <4.11.2
1212
inquirer>=2.10.0, <=3.1.2
1313
psutil<5.9.5
1414
click<=8.1.3
15-
fastapi<0.89.0 # strict; TODO: broken serializations
15+
16+
fastapi>=0.69.0,<0.89.0 # strict; TODO: broken serializations
17+
starlette # https://fastapi.tiangolo.com/deployment/versions/#about-starlette
18+
pydantic>=1.7.4,<2.0.0 # https://fastapi.tiangolo.com/deployment/versions/#about-pydantic
1619

1720
dateutils<=0.6.12
1821
Jinja2<=3.1.2
19-
pydantic<=1.10.4
2022
PyYAML<=6.0
2123
requests<2.28.3
2224
rich >=12.3.0, <=13.0.1
23-
starlette<0.24.0
2425
urllib3<=1.26.13
2526
uvicorn<=0.17.6
2627
websocket-client<1.5.2

requirements/app/test.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ pytest-doctestplus>=0.9.0
66
pytest-asyncio==0.20.3
77
playwright==1.30.0
88
httpx
9-
trio<0.22.0
9+
trio<0.22.0 # strict https://github.com/python-trio/trio/pull/2213
1010
pympler
1111
psutil
1212
setuptools<67.7.0
13-
sqlmodel
1413
requests-mock

tests/tests_app/components/serve/test_model_inference_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pytest
77

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

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

3842
port = find_free_network_port()

0 commit comments

Comments
 (0)