From 1997cf992a0c1ed47bb01fc8b6621f469a36f1ab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 18:24:10 +0000 Subject: [PATCH 1/4] Initial plan From 8cfc3c6c98f0f7bc23146e35ff4c61a023a1343a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 18:32:28 +0000 Subject: [PATCH 2/4] Add Python 3.14 support and drop Python 3.9 support Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 +- .github/workflows/python-check.yaml | 2 +- README.md | 2 +- docs/README.md | 2 +- pyproject.toml | 4 ++-- src/Dockerfile | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) 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/README.md b/README.md index b0b46386..0c9a4f15 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ If you're not using one of the above options for opening the project, then you'l 1. Make sure the following tools are installed: * [Azure Developer CLI (azd)](https://aka.ms/install-azd) - * [Python 3.10+](https://www.python.org/downloads/) + * [Python 3.11+](https://www.python.org/downloads/) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) * [Git](https://git-scm.com/downloads) diff --git a/docs/README.md b/docs/README.md index f5988946..6b2473f7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -87,7 +87,7 @@ If you're not using one of the above options for opening the project, then you'l 1. Make sure the following tools are installed: * [Azure Developer CLI (azd)](https://aka.ms/install-azd) - * [Python 3.10+](https://www.python.org/downloads/) + * [Python 3.11+](https://www.python.org/downloads/) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) * [Git](https://git-scm.com/downloads) 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 From 60ac1e328362f72763952afe4cba70d0585099ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 23:57:57 +0000 Subject: [PATCH 3/4] Keep Python 3.10+ as minimum version in documentation Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- README.md | 2 +- docs/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c9a4f15..b0b46386 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ If you're not using one of the above options for opening the project, then you'l 1. Make sure the following tools are installed: * [Azure Developer CLI (azd)](https://aka.ms/install-azd) - * [Python 3.11+](https://www.python.org/downloads/) + * [Python 3.10+](https://www.python.org/downloads/) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) * [Git](https://git-scm.com/downloads) diff --git a/docs/README.md b/docs/README.md index 6b2473f7..f5988946 100644 --- a/docs/README.md +++ b/docs/README.md @@ -87,7 +87,7 @@ If you're not using one of the above options for opening the project, then you'l 1. Make sure the following tools are installed: * [Azure Developer CLI (azd)](https://aka.ms/install-azd) - * [Python 3.11+](https://www.python.org/downloads/) + * [Python 3.10+](https://www.python.org/downloads/) * [Docker Desktop](https://www.docker.com/products/docker-desktop/) * [Git](https://git-scm.com/downloads) From 3c26ae4c3b967e92d675648a8acedaef667b50f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 00:04:05 +0000 Subject: [PATCH 4/4] Fix MockAzureCredential for Python 3.14 compatibility Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com> --- tests/mock_cred.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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