diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0fed6b75..dc181d89 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "openai-chat-app-quickstart", - "image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye", + "image": "mcr.microsoft.com/devcontainers/python:3.14-bullseye", "forwardPorts": [50505], "features": { "ghcr.io/azure/azure-dev/azd:latest": {} diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index 27503989..bb8d9357 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "windows-latest"] - python_version: ["3.11"] + python_version: ["3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v5 - name: Setup python diff --git a/pyproject.toml b/pyproject.toml index 54cc3dfa..5168d4b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.ruff] lint.select = ["E", "F", "I", "UP"] -target-version = "py311" +target-version = "py314" line-length = 120 src = ["src"] @@ -8,7 +8,7 @@ src = ["src"] known-first-party = ["quartapp"] [tool.black] -target-version = ["py311"] +target-version = ["py314"] line-length = 120 [tool.pytest.ini_options] diff --git a/src/Dockerfile b/src/Dockerfile index fc1e5725..95474f46 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,5 +1,5 @@ # ------------------- Stage 0: Base Stage ------------------------------ -FROM python:3.11-alpine AS base +FROM python:3.14-alpine AS base WORKDIR /code @@ -23,7 +23,7 @@ FROM base AS final RUN addgroup -S app && adduser -S app -G app -COPY --from=build --chown=app:app /usr/local/lib/python3.11 /usr/local/lib/python3.11 +COPY --from=build --chown=app:app /usr/local/lib/python3.14 /usr/local/lib/python3.14 COPY --from=build --chown=app:app /usr/local/bin /usr/local/bin COPY --from=build --chown=app:app /code /code diff --git a/tests/mock_cred.py b/tests/mock_cred.py index d8ea4a33..fc37e87d 100644 --- a/tests/mock_cred.py +++ b/tests/mock_cred.py @@ -2,4 +2,15 @@ class MockAzureCredential(azure.core.credentials_async.AsyncTokenCredential): - pass + async def get_token(self, *scopes, **kwargs): + """Mock get_token method that returns a fake token.""" + import time + + from azure.core.credentials import AccessToken + + # Return a mock token that expires in 1 hour + return AccessToken("mock_token", int(time.time()) + 3600) + + async def close(self): + """Mock close method.""" + pass