diff --git a/.github/workflows/crowdin_upload.yml b/.github/workflows/crowdin_upload.yml index 9ffb383b..0dbfa57a 100644 --- a/.github/workflows/crowdin_upload.yml +++ b/.github/workflows/crowdin_upload.yml @@ -25,7 +25,7 @@ jobs: - name: Install Python uses: actions/setup-python@v3 with: - python-version: "3.12.6" + python-version: "3.13.3" - name: Upgrade pip and setuptools run: pip install --upgrade pip setuptools - name: Install development dependencies diff --git a/.github/workflows/impress.yml b/.github/workflows/impress.yml index 0db5b2fd..02b4ce88 100644 --- a/.github/workflows/impress.yml +++ b/.github/workflows/impress.yml @@ -91,7 +91,7 @@ jobs: - name: Install Python uses: actions/setup-python@v3 with: - python-version: "3.12.6" + python-version: "3.13.3" - name: Upgrade pip and setuptools run: pip install --upgrade pip setuptools - name: Install development dependencies @@ -186,7 +186,7 @@ jobs: - name: Install Python uses: actions/setup-python@v3 with: - python-version: "3.12.6" + python-version: "3.13.3" - name: Install development dependencies run: pip install --user .[dev] diff --git a/CHANGELOG.md b/CHANGELOG.md index e7b2898e..fd61c38f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ and this project adheres to - 📝(frontend) Update documentation - ✅(frontend) Improve tests coverage +- ⬆️(docker) upgrade backend image to python 3.13 #973 + ### Removed diff --git a/Dockerfile b/Dockerfile index 23f26b70..37c76034 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Django impress # ---- base image to inherit from ---- -FROM python:3.12.6-alpine3.20 AS base +FROM python:3.13.3-alpine AS base # Upgrade pip to its latest release to speed up dependencies installation RUN python -m pip install --upgrade pip setuptools @@ -30,7 +30,7 @@ RUN mkdir /install && \ # ---- mails ---- -FROM node:20 AS mail-builder +FROM node:24 AS mail-builder COPY ./src/mail /mail/app @@ -139,6 +139,9 @@ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] # ---- Production image ---- FROM core AS backend-production +# Remove apk cache, we don't need it anymore +RUN rm -rf /var/cache/apk/* + ARG IMPRESS_STATIC_ROOT=/data/static # Gunicorn diff --git a/src/backend/core/tests/documents/test_api_documents_attachment_upload.py b/src/backend/core/tests/documents/test_api_documents_attachment_upload.py index 214a1a2b..94fd9771 100644 --- a/src/backend/core/tests/documents/test_api_documents_attachment_upload.py +++ b/src/backend/core/tests/documents/test_api_documents_attachment_upload.py @@ -410,5 +410,9 @@ def test_api_documents_attachment_upload_unsafe(): "is_unsafe": "true", "status": "processing", } - assert file_head["ContentType"] == "application/octet-stream" + # Depending the libmagic version, the content type may change. + assert file_head["ContentType"] in [ + "application/x-dosexec", + "application/octet-stream", + ] assert file_head["ContentDisposition"] == 'attachment; filename="script.exe"'