Skip to content

Commit 0da042f

Browse files
committed
⬆️(docker) upgrade backend image to python 3.13
Python 3.13 is now stable, our libraries are compatible with it. We also upgrade the alpine version used in order to fix CVE related to libxml2
1 parent 6cd0cd0 commit 0da042f

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.github/workflows/crowdin_upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install Python
2626
uses: actions/setup-python@v3
2727
with:
28-
python-version: "3.12.6"
28+
python-version: "3.13.3"
2929
- name: Upgrade pip and setuptools
3030
run: pip install --upgrade pip setuptools
3131
- name: Install development dependencies

.github/workflows/impress.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
- name: Install Python
9292
uses: actions/setup-python@v3
9393
with:
94-
python-version: "3.12.6"
94+
python-version: "3.13.3"
9595
- name: Upgrade pip and setuptools
9696
run: pip install --upgrade pip setuptools
9797
- name: Install development dependencies
@@ -186,7 +186,7 @@ jobs:
186186
- name: Install Python
187187
uses: actions/setup-python@v3
188188
with:
189-
python-version: "3.12.6"
189+
python-version: "3.13.3"
190190

191191
- name: Install development dependencies
192192
run: pip install --user .[dev]

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ and this project adheres to
2020

2121
- 📝(frontend) Update documentation
2222
- ✅(frontend) Improve tests coverage
23+
- ⬆️(docker) upgrade backend image to python 3.13 #973
24+
2325

2426
### Removed
2527

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Django impress
22

33
# ---- base image to inherit from ----
4-
FROM python:3.12.6-alpine3.20 AS base
4+
FROM python:3.13.3-alpine AS base
55

66
# Upgrade pip to its latest release to speed up dependencies installation
77
RUN python -m pip install --upgrade pip setuptools
@@ -30,7 +30,7 @@ RUN mkdir /install && \
3030

3131

3232
# ---- mails ----
33-
FROM node:20 AS mail-builder
33+
FROM node:24 AS mail-builder
3434

3535
COPY ./src/mail /mail/app
3636

@@ -139,6 +139,9 @@ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
139139
# ---- Production image ----
140140
FROM core AS backend-production
141141

142+
# Remove apk cache, we don't need it anymore
143+
RUN rm -rf /var/cache/apk/*
144+
142145
ARG IMPRESS_STATIC_ROOT=/data/static
143146

144147
# Gunicorn

src/backend/core/tests/documents/test_api_documents_attachment_upload.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,5 +410,9 @@ def test_api_documents_attachment_upload_unsafe():
410410
"is_unsafe": "true",
411411
"status": "processing",
412412
}
413-
assert file_head["ContentType"] == "application/octet-stream"
413+
# Depending the libmagic version, the content type may change.
414+
assert file_head["ContentType"] in [
415+
"application/x-dosexec",
416+
"application/octet-stream",
417+
]
414418
assert file_head["ContentDisposition"] == 'attachment; filename="script.exe"'

0 commit comments

Comments
 (0)