chore: update dependencies and enable HTTP/2 support for AsyncClient in tests (#4173)

* Update dependencies in pyproject.toml: fastapi, httpx, python-multipart

* Enable HTTP/2 support for AsyncClient in test configurations
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-10-23 10:02:06 -03:00 • committed by GitHub
commit e93397d118
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 15 deletions

View file

@ -104,8 +104,8 @@ maintainers = [
dependencies = [
"fastapi>=0.111.0",
"httpx>=0.27",
"fastapi>=0.115.2",
"httpx[http2]>=0.27",
"uvicorn>=0.30.0",
"gunicorn>=22.0.0",
"langchain~=0.3.3",
@ -120,7 +120,7 @@ dependencies = [
"typer>=0.12.0",
"cachetools>=5.3.1",
"platformdirs>=4.2.0",
"python-multipart>=0.0.7",
"python-multipart>=0.0.12",
"orjson==3.10.0",
"alembic>=1.13.0",
"passlib>=1.7.4",
@ -193,7 +193,7 @@ dev = [
"ipykernel>=6.29.0",
"mypy>=1.11.0",
"ruff>=0.6.2",
"httpx>=0.27",
"httpx[http2]>=0.27",
"pytest>=8.2.0",
"types-requests>=2.32.0",
"requests>=2.32.0",

View file

@ -118,7 +118,7 @@ async def async_client() -> AsyncGenerator:
from langflow.main import create_app
app = create_app()
async with AsyncClient(app=app, base_url="http://testserver") as client:
async with AsyncClient(app=app, base_url="http://testserver", http2=True) as client:
yield client
@ -306,7 +306,7 @@ async def client_fixture(
# app.dependency_overrides[get_session] = get_session_override
async with (
LifespanManager(app, startup_timeout=None, shutdown_timeout=None) as manager,
AsyncClient(transport=ASGITransport(app=manager.app), base_url="http://testserver/") as client,
AsyncClient(transport=ASGITransport(app=manager.app), base_url="http://testserver/", http2=True) as client,
):
yield client
# app.dependency_overrides.clear()