From 57ac58297730617981e3c585f7963c973ea19ff2 Mon Sep 17 00:00:00 2001 From: SavioNYJC Date: Fri, 15 May 2026 05:14:23 +0000 Subject: [PATCH] feat: support python 3.13 --- .devcontainer/Dockerfile | 2 +- .github/workflows/integration-tests.yml | 7 +++---- .github/workflows/sanity-check.yml | 3 +-- .github/workflows/type-check.yml | 3 +-- .github/workflows/unit-tests.yml | 3 +-- AGENTS.md | 7 ++++--- docs/GETTING-STARTED.md | 7 ++++--- tests/sanity_check.py | 2 +- 8 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index adfc93a6..0473a0de 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/python:3.12 +FROM mcr.microsoft.com/devcontainers/python:3.13 # Remove any problematic third-party apt source (yarn) added by the base image # so `apt-get update` does not fail due to a missing GPG key, then install gh diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bb41fcc8..887a6d51 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -15,14 +15,13 @@ jobs: name: Integration Tests (${{ matrix.python-version }}) runs-on: ubuntu-latest timeout-minutes: 8 - # Run integration tests for both supported versions. - # Python 3.12 remains visible-but-optional during the migration window. + # Run integration tests for all supported Python versions. # Weekly branch integration failures remain non-blocking as before. - continue-on-error: ${{ matrix.python-version == '3.12' || github.base_ref == 'weekly' || (github.event_name == 'push' && github.ref_name == 'weekly') }} + continue-on-error: ${{ github.base_ref == 'weekly' || (github.event_name == 'push' && github.ref_name == 'weekly') }} strategy: fail-fast: false matrix: - python-version: ['3.11', '3.12'] + python-version: ['3.11', '3.12', '3.13'] env: ENV: testing steps: diff --git a/.github/workflows/sanity-check.yml b/.github/workflows/sanity-check.yml index 43ded883..b8608689 100644 --- a/.github/workflows/sanity-check.yml +++ b/.github/workflows/sanity-check.yml @@ -15,11 +15,10 @@ jobs: name: Sanity Check (${{ matrix.python-version }}) runs-on: ubuntu-latest timeout-minutes: 2 - continue-on-error: ${{ matrix.python-version == '3.12' }} strategy: fail-fast: false matrix: - python-version: ['3.11', '3.12'] + python-version: ['3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 - name: Set up Python diff --git a/.github/workflows/type-check.yml b/.github/workflows/type-check.yml index 5be7c2a6..dc7f1475 100644 --- a/.github/workflows/type-check.yml +++ b/.github/workflows/type-check.yml @@ -12,11 +12,10 @@ jobs: name: Type Check (${{ matrix.python-version }}) runs-on: ubuntu-latest timeout-minutes: 3 - continue-on-error: ${{ matrix.python-version == '3.12' }} strategy: fail-fast: false matrix: - python-version: ['3.11', '3.12'] + python-version: ['3.11', '3.12', '3.13'] env: ENV: testing steps: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 72d9dc99..04fc9e70 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,11 +15,10 @@ jobs: name: Unit Tests (${{ matrix.python-version }}) runs-on: ubuntu-latest timeout-minutes: 3 - continue-on-error: ${{ matrix.python-version == '3.12' }} strategy: fail-fast: false matrix: - python-version: ['3.11', '3.12'] + python-version: ['3.11', '3.12', '3.13'] env: ENV: testing steps: diff --git a/AGENTS.md b/AGENTS.md index 48a68030..1b6ac4a5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,7 +9,7 @@ Essential reminders for working on the Campus codebase. This guide applies to bo Campus uses pyenv for Python version management and pipx for Poetry installation. **Prerequisites:** -- pyenv with Python 3.11 and/or 3.12 installed +- pyenv with Python 3.11, 3.12, and/or 3.13 installed - pipx with Poetry installed - `~/.local/bin` and pyenv shims in PATH (configured in `~/.bashrc`) @@ -19,9 +19,10 @@ Campus uses pyenv for Python version management and pipx for Poetry installation # Install supported Python versions pyenv install 3.11.11 pyenv install 3.12.0 +pyenv install 3.13.0 -# Prefer 3.12 for new setups; 3.11 remains supported -pyenv local 3.12.0 +# Prefer 3.13 for new setups; 3.11 and 3.12 remain supported +pyenv local 3.13.0 # Install Poetry via pipx using the active interpreter pipx install poetry diff --git a/docs/GETTING-STARTED.md b/docs/GETTING-STARTED.md index 4c5169e2..70efdab6 100644 --- a/docs/GETTING-STARTED.md +++ b/docs/GETTING-STARTED.md @@ -33,7 +33,7 @@ For those deploying or using Campus: ### Prerequisites - **pyenv** for Python version management -- **Python 3.11 or 3.12** (managed via pyenv; prefer 3.12 for new setups) +- **Python 3.11, 3.12, or 3.13** (managed via pyenv; prefer 3.13 for new setups) - **pipx** for installing Poetry - **Poetry** for dependency management (installed via pipx) - PostgreSQL (for auth service database) @@ -46,9 +46,10 @@ For those deploying or using Campus: # 2. Install supported Python versions pyenv install 3.11.11 pyenv install 3.12.0 +pyenv install 3.13.0 -# 3. Select the interpreter for this repo (3.12 preferred; 3.11 also supported) -pyenv local 3.12.0 +# 3. Select the interpreter for this repo (3.13 preferred; 3.11 and 3.12 also supported) +pyenv local 3.13.0 # 4. Install Poetry via pipx (user-level, isolated) pipx install poetry diff --git a/tests/sanity_check.py b/tests/sanity_check.py index eb34e650..f949297a 100644 --- a/tests/sanity_check.py +++ b/tests/sanity_check.py @@ -161,7 +161,7 @@ def test_python_version_matches_requirements(self): "Could not find python requirement in pyproject.toml" ) - # Parse version constraint (e.g., ">=3.11.0,<3.13") + # Parse version constraint (e.g., ">=3.11.0,<3.14") runtime_version = sys.version_info runtime_version_str = f"{runtime_version.major}.{runtime_version.minor}.{runtime_version.micro}"