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 .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.13" ]
python-version: [ "3.14" ]

env:
PYTHONDONTWRITEBYTECODE: 1
Expand Down
37 changes: 14 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
FROM ubuntu:oracular AS build
FROM ubuntu:25.10 AS base

RUN apt-get update -qy && apt-get install -qyy \
RUN apt-get update -qy \
&& apt-get install -qyy \
-o APT::Install-Recommends=false \
-o APT::Install-Suggests=false \
build-essential \
ca-certificates \
python3-setuptools \
python3.13-dev \
git
python3.14-dev
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git package has been removed from the build dependencies. If any Python packages need to be installed from git repositories (as was done in the old pyproject.old with pendulum), or if any dependencies use git during their build process, this will cause the build to fail. Verify that git is not needed before removing it.

Suggested change
python3.14-dev
python3.14-dev \
git

Copilot uses AI. Check for mistakes.


COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copy destination path is incorrect. The destination should be /usr/local/bin/ or similar, not /bin/. Additionally, copying both /uv and /uvx separately suggests they should maintain their individual paths. The correct syntax should be COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/ to copy both executables to the bin directory.

Suggested change
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/

Copilot uses AI. Check for mistakes.

ENV UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_PYTHON_DOWNLOADS=never \
UV_PYTHON=python3.13 \
UV_PYTHON=python3.14 \
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The UV_PYTHON_DOWNLOADS=never environment variable has been removed. This was likely intentional to allow uv to download Python if needed, but combined with the change to Python 3.14 (which may not be available), this could cause unexpected behavior. If the intention is to use only system Python, this should be kept as UV_PYTHON_DOWNLOADS=never.

Suggested change
UV_PYTHON=python3.14 \
UV_PYTHON=python3.14 \
UV_PYTHON_DOWNLOADS=never \

Copilot uses AI. Check for mistakes.
UV_PROJECT_ENVIRONMENT=/panettone

COPY pyproject.toml /_lock/
COPY uv.lock /_lock/

RUN --mount=type=cache,target=/root/.cache
RUN cd /_lock && uv sync \
--locked \
--no-dev \
--no-install-project
RUN cd /_lock && uv sync --locked --no-install-project
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --no-dev flag has been removed from the uv sync command. This means development dependencies will now be installed in the production Docker image, increasing the image size unnecessarily. If this is a production image, add back --no-dev to exclude development dependencies.

Suggested change
RUN cd /_lock && uv sync --locked --no-install-project
RUN cd /_lock && uv sync --locked --no-install-project --no-dev

Copilot uses AI. Check for mistakes.
##########################################################################
FROM ubuntu:oracular
FROM ubuntu:25.10

ENV PATH=/panettone/bin:$PATH

Expand All @@ -38,15 +34,14 @@ STOPSIGNAL SIGINT
RUN apt-get update -qy && apt-get install -qyy \
-o APT::Install-Recommends=false \
-o APT::Install-Suggests=false \
python3.13 \
libpython3.13 \
libpcre3 \
libxml2
python3.14 \
libpython3.14 \
libpcre3
Comment on lines +37 to +39
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libxml2 dependency has been removed. If the application or any of its dependencies (such as lxml, which is commonly used) require libxml2, this will cause runtime errors. Verify that this dependency is truly unnecessary before removing it.

Copilot uses AI. Check for mistakes.

RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build --chown=panettone:panettone /panettone /panettone
COPY --from=base --chown=panettone:panettone /panettone /panettone

USER panettone
WORKDIR /panettone
Expand All @@ -56,8 +51,4 @@ COPY /templates/ templates/
COPY .env app/
COPY alembic.ini /panettone/alembic.ini
COPY /alembic/ /panettone/alembic/
COPY pyproject.toml /panettone/pyproject.toml

RUN python -V
RUN python -Im site
RUN python -Ic 'import uvicorn'
COPY pyproject.toml /panettone/pyproject.toml
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ docker-up: ## Run project with compose
docker-clean: ## Clean and reset project containers and volumes
docker compose down -v --remove-orphans | true
docker compose rm -f | true
docker volume rm panettone_postgres_data | true
docker volume ls -q | grep panettone_postgres_data | xargs -r docker volume rm | true

# ====================================================================================
# DATABASE MIGRATIONS
Expand Down
6 changes: 4 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ services:
ports:
- "8080:8080"
depends_on:
- postgres
- redis
postgres:
condition: service_healthy
redis:
condition: service_started

postgres:
container_name: panettone_postgres
Expand Down
90 changes: 0 additions & 90 deletions pyproject.old

This file was deleted.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[project]
name = "fastapi-sqlalchemy-asyncpg"
version = "0.21.0"
version = "0.22.0"
description = "A modern FastAPI application with SQLAlchemy 2.0 and AsyncPG for high-performance async database operations. Features include JWT authentication with Redis token storage, password hashing, connection pooling, data processing with Polars, Rich logging, task scheduling with APScheduler, and Shakespeare datasets integration."
readme = "README.md"
requires-python = ">=3.13"
requires-python = ">=3.14"
dependencies = [
"fastapi[all]>=0.116.2",
"pydantic[email]>=2.12.0a1",
"pydantic-settings>=2.10.1",
"sqlalchemy>=2.0.43",
"uvicorn[standard]>=0.36.0",
"sqlalchemy==2.0.44",
"uvicorn==0.38.0",
"asyncpg>=0.30.0",
"alembic>=1.16.5",
"httpx>=0.28.1",
Expand All @@ -21,15 +21,15 @@ dependencies = [
"pyjwt>=2.10.1",
"redis>=6.4.0",
"bcrypt>=4.3.0",
"polars[pyarrow]>=1.33.1",
"polars==1.35.2",
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [pyarrow] extra has been removed from the polars dependency. If the application uses PyArrow-backed operations in Polars (e.g., reading Parquet files, Arrow IPC, or certain data conversions), this may break functionality. Consider whether the pyarrow extra is still needed.

Suggested change
"polars==1.35.2",
"polars==1.35.2",
"pyarrow>=14.0.0",

Copilot uses AI. Check for mistakes.
"python-multipart>=0.0.20",
"fastexcel>=0.15.1",
"inline-snapshot>=0.29.0",
"dirty-equals>=0.10.0",
"polyfactory>=2.22.2",
"granian>=2.5.4",
"apscheduler[redis,sqlalchemy]>=4.0.0a6",
"rotoger>=0.1.1",
"rotoger==0.1.1",
]

[tool.uv]
Expand Down
Loading