Skip to content

Upgrade to Python 3.14 and simplify responses#24

Merged
YoshihitoAso merged 1 commit into
mainfrom
py314
Jun 23, 2026
Merged

Upgrade to Python 3.14 and simplify responses#24
YoshihitoAso merged 1 commit into
mainfrom
py314

Conversation

@YoshihitoAso

Copy link
Copy Markdown
Member

This pull request upgrades the project to Python 3.14 and updates several dependencies and configurations to ensure compatibility and improve security.
It also removes the custom ORJSON response logic, simplifies response handling, and updates exception handlers to use the latest FastAPI status codes.

Dependency and Environment Upgrades:

  • Updated Python version to 3.14.2 in Dockerfile, tests/Dockerfile_unittest, and pyproject.toml, and set target-version to py314 in Ruff configuration.
  • Upgraded key dependencies: FastAPI, Pydantic, Gunicorn, ruff, uvicorn-worker, and switched from httpx to httpx2. Updated development dependencies accordingly.
  • Updated uv version to 0.9.16 and added UV_MALWARE_CHECK=1 to installation commands for enhanced security in both Dockerfiles and Makefile.

Configuration and Tooling:

  • Updated .pre-commit-config.yaml to use Ruff 0.15.13 and Python 3.14.
  • Added [tool.uv] exclude-newer = "7 days" to pyproject.toml for dependency management.

Codebase Simplification and Compatibility:

  • Removed custom ORJSON response handling and related code from app/utils/fastapi_utils.py, simplifying JSON response logic.
  • Updated FastAPI exception handlers in app/main.py to use status.HTTP_422_UNPROCESSABLE_CONTENT instead of the deprecated UNPROCESSABLE_ENTITY.
  • Updated test client setup in tests/conftest.py to use httpx2.ASGITransport for compatibility with httpx2.

@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report •
FileStmtsMissBranchBrPartCoverMissing
app
   main.py70168377%75, 87–88, 102, 108, 127–128, 145, 154–155, 164–165, 176–177, 188–189
app/utils
   fastapi_utils.py3000100% 
tests
   conftest.py1430078%30, 34–35
TOTAL45697764678% 

Tests Skipped Failures Errors Time
6 0 💤 0 ❌ 0 🔥 3.376s ⏱️

@YoshihitoAso YoshihitoAso merged commit 92a4a92 into main Jun 23, 2026
5 checks passed
@YoshihitoAso YoshihitoAso deleted the py314 branch June 23, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant