From 6d01523d8d91a7025129bc98c6cd2c4e65767cb4 Mon Sep 17 00:00:00 2001 From: jomo Date: Thu, 1 Feb 2024 01:04:20 +0100 Subject: [PATCH] update python version and modules --- Dockerfile | 2 +- main.py | 2 +- requirements.txt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 228fbb6..9cfa1aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-alpine +FROM python:3.12-alpine3.19 WORKDIR /app diff --git a/main.py b/main.py index 138806b..cc4092d 100644 --- a/main.py +++ b/main.py @@ -37,7 +37,7 @@ def _set_sqlite_pragma(conn, _): async def list_items(db: Session = Depends(get_db)): # natural sort by id natsort = lambda item: [ - int(t) if t.isdigit() else t.lower() for t in re.split("(\d+)", item.id) + int(t) if t.isdigit() else t.lower() for t in re.split(r"(\d+)", item.id) ] items = crud.get_items(db) items = sorted(items, key=natsort) diff --git a/requirements.txt b/requirements.txt index 54b2b3d..92fc06b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -fastapi>=0.79.0 -sqlalchemy>=1.4.39 -uvicorn>=0.17.6 +fastapi>=0.109.0 +sqlalchemy>=2.0.25 +uvicorn>=0.27.0.post1