Skip to content

feat: Upgrade project to Python 3.14 #1144

Description

@myakove

Summary

Upgrade the project from Python 3.13 to Python 3.14. PR #1139 (Renovate) bumped requires-python in pyproject.toml and uv.lock but missed all infrastructure changes, causing all CI checks to fail (build-container, python-module-install, tox, pre-commit, can-be-merged).

This issue tracks all required changes to fully migrate to Python 3.14.

Root Cause of CI Failures

The Renovate PR only changes pyproject.toml (requires-python = "==3.14.*") and regenerates uv.lock with cp314 wheels. The container image and all CI infrastructure still target Python 3.13, so uv sync and every check that needs a matching interpreter fail.

Changes Required

1. Dockerfile (critical — blocks all CI)

File: Dockerfile

  • Line 36: Change python3.13-develpython3.14-devel
  • Line 61: Change ENV UV_PYTHON=python3.13ENV UV_PYTHON=python3.14
  • Verify:" python3.14-devel is available in quay.io/podman/stable:v5 (Fedora 42 repos — confirmed available via dnf install python3.14-devel)

2. pyproject.toml

File: pyproject.toml

3. uv.lock

File: uv.lock

  • Regenerate with uv lock after pyproject.toml change (already done in PR ci(deps): update python to ==3.14.* #1139)
  • All major dependencies (aiohttp, uvloop, watchfiles, websockets, yarl, etc.) have cp314 wheels available ✅

4. Documentation (6 files referencing Python 3.13)

All Python version references need updating:

  • docs/installation.md — 3 references: "Python 3.13.x interpreter", requires-python = "==3.13.*", "Once Python 3.13.x and uv are available"
  • docs/quick-start.md — 1 reference: "Python 3.13"
  • docs/docker-deployment.md — 1 reference: ENV UV_PYTHON=python3.13

Note: docs/ files are AI-generated by docsfy — regenerate with docsfy after code changes rather than editing manually.

5. Remove deprecated from __future__ import annotations (19 files)

Python 3.14 implements PEP 649 (deferred evaluation of annotations), making from __future__ import annotations deprecated. While it still works, it should be removed to avoid deprecation warnings and align with the new behavior.

Files (19 total):

  • webhook_server/libs/ai_cli.py
  • webhook_server/libs/handlers/pull_request_handler.py
  • webhook_server/libs/handlers/pull_request_review_handler.py
  • webhook_server/libs/handlers/issue_comment_handler.py
  • webhook_server/libs/github_api.py
  • webhook_server/libs/test_oracle.py
  • webhook_server/tests/test_clean_rebase_detection.py
  • webhook_server/tests/test_ai_cli.py
  • webhook_server/tests/test_json_log_handler.py
  • webhook_server/tests/test_safe_rotating_handler.py
  • webhook_server/tests/test_helpers_sanitization.py
  • webhook_server/tests/test_tool_server.py
  • webhook_server/tests/test_prepare_retest_welcome_comment.py
  • webhook_server/tests/test_context.py
  • webhook_server/tests/test_test_oracle.py
  • webhook_server/utils/safe_rotating_handler.py
  • webhook_server/utils/notification_utils.py
  • webhook_server/utils/helpers.py
  • webhook_server/web/tool_server.py

6. Project memory update

  • Update .pi/memory/ pattern entry: "FastAPI vwebhook server; Python 3.13" → "Python 3.14"

Python 3.14 Compatibility Assessment

No breaking changes found in the codebase:

  • ✅ No usage of removed stdlib modules (cgi, telnetlib, aifc, etc.)
  • ✅ No ast.Num/ast.Str/ast.Bytes usage (removed in 3.14)
  • ✅ No asyncio.get_event_loop() (deprecated in 3.14)
  • ✅ No direct __annotations__ access (broken by PEP
  • ✅ No return/break/continue in finally blocks (now SyntaxError per PEP 765)
  • ✅ All major deps have cp314 wheels (aiohttp, uvloop, watchfiles, websockets, yarl, PyGitHub, pydantic, etc.)

Related

Done

  • Update Dockerfile: python3.14-devel and ENV UV_PYTHON=python3.14
  • Update pyproject.toml: requires-python = "==3.14.*" (done in PR ci(deps): update python to ==3.14.* #1139)
  • Regenerate uv.lock with Python 3.14 wheels (done in PR ci(deps): update python to ==3.14.* #1139)
  • Remove from __future__ import annotations from 19 files
  • Regenerate docs with docsfy (updates installation.md, quick-start.md, docker-deployment.md)
  • Verify container builds successfully with Python 3.14
  • All CI checks pass (build-container, tox, pre-commit, python-module-install)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions