Skip to content

Commit 74afcbd

Browse files
committed
💥 Upgrade to trixie
1 parent a82be62 commit 74afcbd

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
hooks:
2121
- id: mypy
2222
name: mypy
23-
entry: uv run mypy
23+
entry: mypy
2424
language: python
2525
require_serial: true
2626
types: [python]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:bookworm
1+
FROM python:trixie
22
LABEL org.opencontainers.image.authors="Nikolai R Kristiansen <nikolaik@gmail.com>"
33

44
RUN groupadd --gid 1000 pn && useradd --uid 1000 --gid pn --shell /bin/bash --create-home pn

src/docker_python_nodejs/dockerfiles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from jinja2 import Environment, FileSystemLoader, select_autoescape
99

10-
from .settings import DOCKERFILES_PATH
10+
from .settings import DEFAULT_DISTRO, DOCKERFILES_PATH
1111
from .versions import BuildVersion
1212

1313
logger = logging.getLogger("dpn")
@@ -25,7 +25,7 @@ def render_dockerfile(version: BuildVersion) -> str:
2525

2626
context = dataclasses.asdict(version) | {
2727
"now": datetime.datetime.now(datetime.UTC).isoformat()[:-7],
28-
"distro": "bookworm" if version.distro == "slim" else version.distro, # slim is an image variant
28+
"distro": DEFAULT_DISTRO if version.distro == "slim" else version.distro, # slim is an image variant
2929
"distro_variant": "slim" if version.distro == "slim" else "full",
3030
}
3131

src/docker_python_nodejs/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
DOCKERFILES_PATH = BASE_PATH / "dockerfiles"
77

88
DEFAULT_PLATFORMS = ["linux/amd64", "linux/arm64"]
9-
DEFAULT_DISTRO = "bookworm"
10-
DISTROS = ["bookworm", "bullseye", "slim", "alpine"]
9+
DEFAULT_DISTRO = "trixie"
10+
DISTROS = ["trixie", "bookworm", "slim", "alpine"]

tests/test_all.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ def build_version_fixture() -> BuildVersion:
2626
key="python3.11-nodejs20",
2727
python="3.11",
2828
python_canonical="3.11.3",
29-
python_image="3.11.3-bookworm",
29+
python_image="3.11.3-trixie",
3030
nodejs="20",
3131
nodejs_canonical="20.2.0",
32-
distro="bookworm",
32+
distro="trixie",
3333
platforms=[
3434
"linux/amd64",
3535
"linux/arm64",
@@ -121,7 +121,7 @@ def python_tags_fixture() -> dict[str, Any]:
121121
"previous": None,
122122
"results": [
123123
{
124-
"name": "3.11.4-bookworm",
124+
"name": "3.11.4-trixie",
125125
"images": [{"os": "linux", "architecture": "amd64"}, {"os": "linux", "architecture": "arm64"}],
126126
},
127127
{
@@ -194,13 +194,13 @@ def test_decide_version_combinations(
194194
python_version = SupportedVersion(start="2022-10-24", end="2027-10", version="3.11")
195195
node_version = SupportedVersion(start="2023-04-18", end="2026-04-30", version="v20")
196196

197-
versions = decide_version_combinations(["bookworm", "alpine"], [python_version], [node_version])
197+
versions = decide_version_combinations(["trixie", "alpine"], [python_version], [node_version])
198198

199199
assert versions
200200
assert len(versions) == python_tags["count"]
201201
assert versions[0].nodejs_canonical == "20.3.0"
202202
assert versions[0].python_canonical == "3.11.4"
203-
assert versions[0].distro == "bookworm"
203+
assert versions[0].distro == "trixie"
204204
assert versions[1].nodejs_canonical == "20.3.0"
205205
assert versions[1].python_canonical == "3.11.4"
206206
assert versions[1].distro == "alpine"
@@ -248,7 +248,7 @@ def test_decide_nodejs_versions(
248248
json=node_unofficial_releases,
249249
)
250250
supported_node_versions = fetch_supported_nodejs_versions()
251-
distros = ["bookworm", "alpine"]
251+
distros = ["trixie", "alpine"]
252252
versions = decide_nodejs_versions(distros, supported_node_versions)
253253

254254
assert len(supported_node_versions) * len(distros) == len(versions)

0 commit comments

Comments
 (0)