Skip to content

Commit 466be73

Browse files
committed
feat(docker): Use Python 3.14 in docker images
Signed-off-by: kiblik <5609770+kiblik@users.noreply.github.com>
1 parent 4c5de62 commit 466be73

35 files changed

Lines changed: 125 additions & 48 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This checklist is for your information.
2626
- [ ] Bugfixes should be submitted against the `bugfix` branch.
2727
- [ ] Give a meaningful name to your PR, as it may end up being used in the release notes.
2828
- [ ] Your code is flake8 compliant.
29-
- [ ] Your code is python 3.13 compliant.
29+
- [ ] Your code is python 3.14 compliant.
3030
- [ ] If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
3131
- [ ] Model changes must include the necessary migrations in the dojo/db_migrations folder.
3232
- [ ] Add applicable tests to the unit tests.

Dockerfile.django-alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Dockerfile.nginx to use the caching mechanism of Docker.
66

77
# Ref: https://devguide.python.org/#branchstatus
8-
FROM python:3.13.7-alpine3.22@sha256:9ba6d8cbebf0fb6546ae71f2a1c14f6ffd2fdab83af7fa5669734ef30ad48844 AS base
8+
FROM python:3.14.0-alpine3.22@sha256:e1a567200b6d518567cc48994d3ab4f51ca54ff7f6ab0f3dc74ac5c762db0800 AS base
99
FROM base AS build
1010
WORKDIR /app
1111
RUN \

Dockerfile.django-debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Dockerfile.nginx to use the caching mechanism of Docker.
66

77
# Ref: https://devguide.python.org/#branchstatus
8-
FROM python:3.13.7-slim-trixie@sha256:5f55cdf0c5d9dc1a415637a5ccc4a9e18663ad203673173b8cda8f8dcacef689 AS base
8+
FROM python:3.14.0-slim-trixie@sha256:7bea65ece84b6f78689e6f2caa60d386452ef5db9361484523b18fb84f95389c AS base
99
FROM base AS build
1010
WORKDIR /app
1111
RUN \

Dockerfile.integration-tests-debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
FROM openapitools/openapi-generator-cli:v7.17.0@sha256:868b97eb4e5080d2cdfd5b3eeaa4d52e4bbb7c56f14e234b08b0b0bc4f38a78f AS openapitools
55
# currently only supports x64, no arm yet due to chrome and selenium dependencies
6-
FROM python:3.13.7-slim-trixie@sha256:5f55cdf0c5d9dc1a415637a5ccc4a9e18663ad203673173b8cda8f8dcacef689 AS build
6+
FROM python:3.14.0-slim-trixie@sha256:7bea65ece84b6f78689e6f2caa60d386452ef5db9361484523b18fb84f95389c AS build
77
WORKDIR /app
88
RUN \
99
apt-get -y update && \

Dockerfile.nginx-alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Dockerfile.django-alpine to use the caching mechanism of Docker.
66

77
# Ref: https://devguide.python.org/#branchstatus
8-
FROM python:3.13.7-alpine3.22@sha256:9ba6d8cbebf0fb6546ae71f2a1c14f6ffd2fdab83af7fa5669734ef30ad48844 AS base
8+
FROM python:3.14.0-alpine3.22@sha256:e1a567200b6d518567cc48994d3ab4f51ca54ff7f6ab0f3dc74ac5c762db0800 AS base
99
FROM base AS build
1010
WORKDIR /app
1111
RUN \

dojo/api_v2/serializers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import re
66
import time
77
from datetime import datetime
8+
from typing import TYPE_CHECKING
89

910
import six
1011
import tagulous
@@ -35,7 +36,6 @@
3536
from dojo.finding.queries import get_authorized_findings
3637
from dojo.group.utils import get_auth_group_name
3738
from dojo.importers.auto_create_context import AutoCreateContextManager
38-
from dojo.importers.base_importer import BaseImporter
3939
from dojo.importers.default_importer import DefaultImporter
4040
from dojo.importers.default_reimporter import DefaultReImporter
4141
from dojo.models import (
@@ -129,6 +129,9 @@
129129
from dojo.utils import is_scan_file_too_large
130130
from dojo.validators import ImporterFileExtensionValidator, tag_validator
131131

132+
if TYPE_CHECKING:
133+
from dojo.importers.base_importer import BaseImporter
134+
132135
logger = logging.getLogger(__name__)
133136
deduplicationLogger = logging.getLogger("dojo.specific-loggers.deduplication")
134137

dojo/engagement/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from pathlib import Path
1010
from tempfile import NamedTemporaryFile
1111
from time import strftime
12+
from typing import TYPE_CHECKING
1213

1314
from django.conf import settings
1415
from django.contrib import messages
@@ -70,7 +71,6 @@
7071
TypedNoteForm,
7172
UploadThreatForm,
7273
)
73-
from dojo.importers.base_importer import BaseImporter
7474
from dojo.importers.default_importer import DefaultImporter
7575
from dojo.models import (
7676
Check_List,
@@ -118,6 +118,9 @@
118118
redirect_to_return_url_or_else,
119119
)
120120

121+
if TYPE_CHECKING:
122+
from dojo.importers.base_importer import BaseImporter
123+
121124
logger = logging.getLogger(__name__)
122125

123126

dojo/finding_group/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import logging
2+
from typing import TYPE_CHECKING
23

34
from django.contrib import messages
45
from django.contrib.admin.utils import NestedObjects
56
from django.core.paginator import Page, Paginator
67
from django.db.models import Count, Min, Q, QuerySet, Subquery
78
from django.db.utils import DEFAULT_DB_ALIAS
8-
from django.http import HttpRequest
99
from django.http.response import HttpResponse, HttpResponseRedirect, JsonResponse
1010
from django.shortcuts import get_object_or_404, render
1111
from django.urls.base import reverse
@@ -27,6 +27,9 @@
2727
from dojo.product.queries import get_authorized_products
2828
from dojo.utils import Product_Tab, add_breadcrumb, get_page_items, get_setting, get_system_setting, get_words_for_field
2929

30+
if TYPE_CHECKING:
31+
from django.http import HttpRequest
32+
3033
logger = logging.getLogger(__name__)
3134

3235

dojo/group/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
from typing import TYPE_CHECKING
23

34
from django.contrib import messages
45
from django.contrib.admin.utils import NestedObjects
@@ -7,7 +8,6 @@
78
from django.core.exceptions import PermissionDenied
89
from django.db import DEFAULT_DB_ALIAS
910
from django.db.models.deletion import RestrictedError
10-
from django.db.models.query import QuerySet
1111
from django.http import HttpRequest, HttpResponseRedirect
1212
from django.shortcuts import get_object_or_404, render
1313
from django.urls import reverse
@@ -49,6 +49,9 @@
4949
redirect_to_return_url_or_else,
5050
)
5151

52+
if TYPE_CHECKING:
53+
from django.db.models.query import QuerySet
54+
5255
logger = logging.getLogger(__name__)
5356

5457

dojo/importers/auto_create_context.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import logging
22
from datetime import datetime, timedelta
3-
from typing import Any
3+
from typing import TYPE_CHECKING, Any
44

55
from crum import get_current_user
66
from django.db import transaction
7-
from django.http.request import QueryDict
87
from django.utils import timezone
98

109
from dojo.models import (
@@ -18,6 +17,9 @@
1817
)
1918
from dojo.utils import get_last_object_or_none, get_object_or_none
2019

20+
if TYPE_CHECKING:
21+
from django.http.request import QueryDict
22+
2123
logger = logging.getLogger(__name__)
2224
deduplicationLogger = logging.getLogger("dojo.specific-loggers.deduplication")
2325

0 commit comments

Comments
 (0)