diff --git a/CHANGELOG.md b/CHANGELOG.md index d36d265f5b14..b64f8e6b45d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,30 @@ ## New Features: No changes to highlight. +## Bug Fixes: +* Updated the minimum FastApi used in tests to version 0.87 [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2647](https://github.com/gradio-app/gradio/pull/2647) + +## Documentation Changes: +No changes to highlight. + +## Testing and Infrastructure Changes: +No changes to highlight. + +## Breaking Changes: +No changes to highlight. + +## Full Changelog: +No changes to highlight. + +## Contributors Shoutout: +No changes to highlight. + + +# Version 3.9.1 + +## New Features: +No changes to highlight. + ## Bug Fixes: * Only set a min height on md and html when loading by [@pngwn](https://github.com/pngwn) in [PR 2623](https://github.com/gradio-app/gradio/pull/2623) diff --git a/test/requirements.in b/test/requirements.in index d770f3293b51..3c10728b7080 100644 --- a/test/requirements.in +++ b/test/requirements.in @@ -18,4 +18,5 @@ isort flake8 httpx pydantic -respx \ No newline at end of file +respx +fastapi>=0.87.0 \ No newline at end of file diff --git a/test/requirements.txt b/test/requirements.txt index e68cc9280c1c..b19aca909ae6 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with python 3.7 +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # # pip-compile --output-file=requirements.txt @@ -7,7 +7,11 @@ alembic==1.8.1 # via mlflow anyio==3.6.1 - # via httpcore + # via + # httpcore + # starlette +appnope==0.1.3 + # via ipython asyncio==3.4.3 # via -r requirements.in attrs==21.4.0 @@ -60,6 +64,8 @@ entrypoints==0.4 # via mlflow everett[ini]==3.0.0 # via comet-ml +fastapi==0.87.0 + # via -r requirements.in filelock==3.7.1 # via # huggingface-hub @@ -76,8 +82,6 @@ gitpython==3.1.27 # via # mlflow # wandb -greenlet==1.1.2 - # via sqlalchemy gunicorn==20.1.0 # via mlflow h11==0.12.0 @@ -102,17 +106,8 @@ imageio==2.19.5 importlib-metadata==4.2.0 # via # alembic - # click - # flake8 # flask - # huggingface-hub - # jsonschema - # mako # mlflow - # pluggy - # pytest - # sqlalchemy - # transformers importlib-resources==5.8.0 # via # alembic @@ -221,7 +216,9 @@ py==1.11.0 pycodestyle==2.8.0 # via flake8 pydantic==1.9.1 - # via -r requirements.in + # via + # -r requirements.in + # fastapi pyflakes==2.4.0 # via flake8 pygments==2.12.0 @@ -322,6 +319,8 @@ sqlalchemy==1.4.39 # mlflow sqlparse==0.4.2 # via mlflow +starlette==0.21.0 + # via fastapi tabulate==0.8.10 # via databricks-cli threadpoolctl==3.1.0 @@ -348,18 +347,12 @@ traitlets==5.3.0 # matplotlib-inline transformers==4.20.1 # via -r requirements.in -typed-ast==1.5.4 - # via black typing-extensions==4.3.0 # via - # anyio # black - # gitpython # huggingface-hub - # importlib-metadata - # jsonschema # pydantic - # pytest-asyncio + # starlette # torch urllib3==1.26.10 # via diff --git a/test/test_blocks.py b/test/test_blocks.py index 7d4ec3a02882..26ccad7f7325 100644 --- a/test/test_blocks.py +++ b/test/test_blocks.py @@ -925,9 +925,11 @@ async def say_hello(name): client = TestClient(app) resp = client.post( - f"{demo.local_url}login", data={"username": "abc", "password": "123"} + f"{demo.local_url}login", + data={"username": "abc", "password": "123"}, + follow_redirects=False, ) - assert resp.ok + assert resp.status_code == 302 token = resp.cookies.get("access-token") assert token diff --git a/test/test_routes.py b/test/test_routes.py index d283fafcaa1d..a754734b9ee2 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -238,11 +238,15 @@ def test_post_login(self): client = TestClient(app) response = client.post( - "/login", data=dict(username="test", password="correct_password") + "/login", + data=dict(username="test", password="correct_password"), + follow_redirects=False, ) assert response.status_code == 302 response = client.post( - "/login", data=dict(username="test", password="incorrect_password") + "/login", + data=dict(username="test", password="incorrect_password"), + follow_redirects=False, ) assert response.status_code == 400