Skip to content

Commit 9a9ebf3

Browse files
Add support for Python 3.12
The CI now runs the tests against Python 3.12 as well. The Dockerfile for arm64 was added to the repository to run the tests for python 3.12 in arm64. Signed-off-by: Daniel Zullo <[email protected]>
1 parent 71a5bbf commit 9a9ebf3

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# License: MIT
2+
# Copyright © 2024 Frequenz Energy-as-a-Service GmbH
3+
# This Dockerfile is used to run the tests in arm64, which is not supported by
4+
# GitHub Actions at the moment.
5+
6+
FROM docker.io/library/ubuntu:20.04
7+
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
10+
# Install Python 3.12 and curl to install pip later
11+
RUN apt-get update -y && \
12+
apt-get install --no-install-recommends -y \
13+
software-properties-common && \
14+
add-apt-repository ppa:deadsnakes/ppa && \
15+
apt-get install --no-install-recommends -y \
16+
ca-certificates \
17+
curl \
18+
git \
19+
python3.12 \
20+
python3.12-distutils && \
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*
23+
24+
# Install pip
25+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
26+
27+
RUN update-alternatives --install \
28+
/usr/local/bin/python python /usr/bin/python3.12 1 && \
29+
python -m pip install --upgrade --no-cache-dir pip
30+
31+
COPY entrypoint.bash /usr/bin/entrypoint.bash
32+
33+
ENTRYPOINT ["/usr/bin/entrypoint.bash"]

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- ubuntu-20.04
3434
python:
3535
- "3.11"
36+
- "3.12"
3637
nox-session:
3738
# To speed things up a bit we use the special ci_checks_max session
3839
# that uses the same venv to run multiple linting sessions
@@ -109,6 +110,7 @@ jobs:
109110
- ubuntu-20.04
110111
python:
111112
- "3.11"
113+
- "3.12"
112114
nox-session:
113115
- "pytest_min"
114116
- "pytest_max"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A development kit to interact with the Frequenz development platform.
1212

1313
The following platforms are officially supported (test):
1414

15-
- **Python:** 3.11
15+
- **Python:** 3.11, 3.12
1616
- **Operating System:** Ubuntu Linux 20.04
1717
- **Architectures:** amd64, arm64
1818

0 commit comments

Comments
 (0)