update python version and modules

This commit is contained in:
jomo 2024-02-01 01:04:20 +01:00
parent 621db6ad2c
commit 6d01523d8d
3 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
FROM python:3.10-alpine FROM python:3.12-alpine3.19
WORKDIR /app WORKDIR /app

View file

@ -37,7 +37,7 @@ def _set_sqlite_pragma(conn, _):
async def list_items(db: Session = Depends(get_db)): async def list_items(db: Session = Depends(get_db)):
# natural sort by id # natural sort by id
natsort = lambda item: [ 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 = crud.get_items(db)
items = sorted(items, key=natsort) items = sorted(items, key=natsort)

View file

@ -1,3 +1,3 @@
fastapi>=0.79.0 fastapi>=0.109.0
sqlalchemy>=1.4.39 sqlalchemy>=2.0.25
uvicorn>=0.17.6 uvicorn>=0.27.0.post1