Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stages:
variables:
# The image tag cannot read .python-version, so the minor is repeated here;
# .python's before_script fails the job if the two disagree.
PYTHON_VERSION: "3.14"
PYTHON_VERSION: "3.15"
# Paths black and flake8 check; mypy takes its paths from [tool.mypy].
CODE_PATHS: src tests scripts
# Throwaway database for the test job. None of these are secrets. The
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.14
3.15
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ notes (see [docs/releasing.md](docs/releasing.md)).
`RequestBodyLimitMiddleware` answers 413 before any route runs (#13).

### Changed
- Python 3.15: `.python-version` says `3.15`, `requires-python` is
`>=3.15,<4.0`, Black targets `py315`, mypy checks against 3.15 and the GitLab
pipeline runs on `python:3.15-slim`. Every dependency ships a 3.15 wheel or is
pure Python; SQLAlchemy 2.0.x installs as pure Python on 3.15 (Known Issues).
uvicorn 0.54.0 and FastAPI 0.143.1 pass the suite on 3.15, although uvicorn's
3.15 support is merged and unreleased and FastAPI's CI matrix still ends at
3.14 (#20).
- Annotations use the current syntax: `X | None` instead of `Optional[X]`,
`SuccessResponse` is a PEP 695 generic (`class SuccessResponse[T]`), and
every route dependency is `Annotated`, through the `SessionDep` and
Expand Down
16 changes: 15 additions & 1 deletion docs/known_issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,25 @@ healthy service with its database down.

## Dependencies

### SQLAlchemy 2.0 runs without its C extensions on Python 3.15

**Where:** `pyproject.toml` (`sqlalchemy (>=2.0.54,<2.1)`).

SQLAlchemy 2.0.x publishes compiled wheels up to Python 3.14 only, so on 3.15
pip installs the pure Python wheel and the Cython speedups (row processing,
result collections) are replaced by their Python implementations. Everything
works and the suite passes; result processing is slower than on 3.14 with the
compiled wheel. SQLAlchemy 2.1.x ships Python 3.15 wheels.

**Fix:** move to SQLAlchemy 2.1 (a new minor with behaviour changes, read its
migration notes first; SQLModel 0.0.48 allows `<2.2`) and drop the `<2.1`
constraint in `pyproject.toml`.

### slowapi calls an asyncio API removed in Python 3.16

**Where:** `slowapi/extension.py` (version 0.1.10), surfaced by `pytest.ini`.

On Python 3.14 the test run reports `DeprecationWarning: 'asyncio.iscoroutinefunction'
On Python 3.14 and 3.15 the test run reports `DeprecationWarning: 'asyncio.iscoroutinefunction'
is deprecated and slated for removal in Python 3.16; use
inspect.iscoroutinefunction()`, raised from slowapi when it wraps a rate-limited
route. Nothing is wrong today; on Python 3.16 the rate limiter would stop
Expand Down
2 changes: 1 addition & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

- Python 3.14 (`.python-version` pins the minor for pyenv, uv and CI; the newest patch release is used)
- Python 3.15 (`.python-version` pins the minor for pyenv, uv and CI; the newest patch release is used)
- [Poetry](https://python-poetry.org/) 2.x
- PostgreSQL (any supported version; CI tests against 17)

Expand Down
10 changes: 3 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
{name = "JsNcAr",email = "jn.arias@uniandes.edu.co"}
]
readme = "README.md"
requires-python = ">=3.14,<4.0"
requires-python = ">=3.15,<4.0"
# Ranges are open to the next major: poetry.lock is the exact pin, Dependabot
# proposes bumps, CI is the check. Update with `poetry update` and the suite.
dependencies = [
Expand Down Expand Up @@ -54,12 +54,12 @@ dev = [
[tool.black]
line-length = 88
# Keep in step with requires-python above.
target-version = ["py314"]
target-version = ["py315"]

# `poetry run mypy src`; CI runs it in the lint job.
[tool.mypy]
# Keep python_version in step with requires-python; files follows the src/ layout.
python_version = "3.14"
python_version = "3.15"
files = ["src", "scripts"]
plugins = ["pydantic.mypy"]
check_untyped_defs = true
Expand Down
Loading