From 4606b5eafcaced6c0b0b5fdc8e40de7d6a8a58d0 Mon Sep 17 00:00:00 2001 From: rjambrecic <32619626+rjambrecic@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:26:37 +0200 Subject: [PATCH] Update packages (#137) * Update packages * Set default httpx timeout * Set default httpx timeout --- Dockerfile | 4 ++-- google_sheets/app.py | 4 ++-- pyproject.toml | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index df526f0..88db4a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,5 +28,5 @@ RUN pip install -e ".[dev]" EXPOSE ${PORT} -ENTRYPOINT [] -CMD [ "/usr/bin/bash", "-c", "./run_server.sh" ] +ENTRYPOINT [] # nosemgrep +CMD [ "/usr/bin/bash", "-c", "./run_server.sh" ] # nosemgrep diff --git a/google_sheets/app.py b/google_sheets/app.py index e48ed88..94193a7 100644 --- a/google_sheets/app.py +++ b/google_sheets/app.py @@ -108,7 +108,7 @@ async def login_callback( token_request_data = get_token_request_data(code) - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(timeout=5) as client: response = await client.post( oauth2_settings["tokenUrl"], data=token_request_data ) @@ -116,7 +116,7 @@ async def login_callback( if response.status_code == 200: token_data = response.json() - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(timeout=5) as client: userinfo_response = await client.get( "https://www.googleapis.com/oauth2/v2/userinfo", headers={"Authorization": f"Bearer {token_data['access_token']}"}, diff --git a/pyproject.toml b/pyproject.toml index 3a73ab3..ede8892 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,9 +47,9 @@ dependencies = [ "pydantic>=2.3,<3", "fastapi>=0.110.2", "prisma==0.13.1", - "google-api-python-client==2.145.0", + "google-api-python-client==2.148.0", "asyncify==0.10.0", - "pandas==2.2.2" + "pandas==2.2.3" ] [project.optional-dependencies] @@ -67,10 +67,10 @@ lint = [ "types-Pygments", "types-docutils", "mypy==1.11.2", - "ruff==0.6.5", + "ruff==0.6.9", "pyupgrade-directories==0.3.0", - "bandit==1.7.9", - "semgrep==1.87.0", + "bandit==1.7.10", + "semgrep==1.90.0", "pytest-mypy-plugins==3.1.2", ]