Skip to content

Commit

Permalink
Add Python 3.13; Drop Python 3.10 (#278)
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Mueller <[email protected]>
  • Loading branch information
frenck and cdce8p authored Nov 5, 2024
1 parent 5589e45 commit 26a71a0
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Alpine version: 3.10, 3.11, 3.12
"args": { "VARIANT": "3.12" }
"args": { "VARIANT": "3.13" }
},

// Set *default* container specific settings.json values on container create.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
DEBIAN_LATEST: "bookworm"
UBUNTU_LATEST: "20.4"
RASPBIAN_LATEST: "bullseye"
PYTHON_LATEST: "3.12"
PYTHON_LATEST: "3.13"

jobs:
init:
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures_alpine) }}
version: ["3.18", "3.19", "3.20"]
python: ["3.10", "3.11", "3.12"]
python: ["3.11", "3.12", "3.13"]
steps:
- name: Checkout the repository
uses: actions/[email protected]
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ We support the latest 3 release with the latest 3 Alpine version.

| Image | OS | Tags | latest |
|-------|----|------|--------|
| armhf-base-python | Alpine | 3.10, 3.11, 3.12, 3.10-alpine3.18, 3.10-alpine3.19, 3.10-alpine3.20, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20 | 3.12-alpine3.20 |
| armv7-base-python | Alpine | 3.10, 3.11, 3.12, 3.10-alpine3.18, 3.10-alpine3.19, 3.10-alpine3.20, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20 | 3.12-alpine3.20 |
| aarch64-base-python | Alpine | 3.10, 3.11, 3.12, 3.10-alpine3.18, 3.10-alpine3.19, 3.10-alpine3.20, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20 | 3.12-alpine3.20 |
| amd64-base-python | Alpine | 3.10, 3.11, 3.12, 3.10-alpine3.18, 3.10-alpine3.19, 3.10-alpine3.20, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20 | 3.12-alpine3.20 |
| i386-base-python | Alpine | 3.10, 3.11, 3.12, 3.10-alpine3.18, 3.10-alpine3.19, 3.10-alpine3.20, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20 | 3.12-alpine3.20 |
| armhf-base-python | Alpine | 3.11, 3.12, 3.13, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20, 3.13-alpine3.18, 3.13-alpine3.19, 3.13-alpine3.20 | 3.13-alpine3.20 |
| armv7-base-python | Alpine | 3.11, 3.12, 3.13, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20, 3.13-alpine3.18, 3.13-alpine3.19, 3.13-alpine3.20 | 3.13-alpine3.20 |
| aarch64-base-python | Alpine | 3.11, 3.12, 3.13, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20, 3.13-alpine3.18, 3.13-alpine3.19, 3.13-alpine3.20 | 3.13-alpine3.20 |
| amd64-base-python | Alpine | 3.11, 3.12, 3.13, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20, 3.13-alpine3.18, 3.13-alpine3.19, 3.13-alpine3.20 | 3.13-alpine3.20 |
| i386-base-python | Alpine | 3.11, 3.12, 3.13, 3.11-alpine3.18, 3.11-alpine3.19, 3.11-alpine3.20, 3.12-alpine3.18, 3.12-alpine3.19, 3.12-alpine3.20, 3.13-alpine3.18, 3.13-alpine3.19, 3.13-alpine3.20 | 3.13-alpine3.20 |

## Others

Expand Down
17 changes: 0 additions & 17 deletions python/3.10/arm-alignment.patch

This file was deleted.

16 changes: 0 additions & 16 deletions python/3.10/asynctio_unix_events.patch

This file was deleted.

16 changes: 0 additions & 16 deletions python/3.10/fix-xattrs-glibc.patch

This file was deleted.

3 changes: 1 addition & 2 deletions python/3.10/Dockerfile → python/3.13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ RUN set -ex \
xz-dev \
zlib-dev \
bluez-dev \
# add build deps before removing fetch deps in case there's overlap
# add build deps before removing fetch deps in case there's overlap
&& apk del .fetch-deps \
\
&& for i in /usr/src/*.patch; do \
Expand All @@ -78,7 +78,6 @@ RUN set -ex \
--with-lto \
--with-system-libmpdec \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
--without-static-libpython \
&& make -j "$(nproc)" \
Expand Down
4 changes: 2 additions & 2 deletions python/3.10/build.yaml → python/3.13/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cosign:
base_identity: https://github.com/home-assistant/docker-base/.*
identity: https://github.com/home-assistant/docker-base/.*
args:
PYTHON_VERSION: 3.10.14
PYTHON_VERSION: 3.13.0
PIP_VERSION: 24.2
GPG_KEY: A035C8C19219BA821ECEA86B64E628F8D684696D
GPG_KEY: 7169605F62C751356D054A26A821E680E5FA6305
labels:
io.hass.base.name: python
org.opencontainers.image.source: https://github.com/home-assistant/docker-base
File renamed without changes.
70 changes: 70 additions & 0 deletions python/3.13/musl-skip_failing_tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
commit 5e047972f7c80e95c2baecc9da86ee049df0b9c1
Author: Marc Mueller <[email protected]>
Date: 2024-10-11 20:11:47 +0200

Skip failing tests on musl

diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index ed23f73e3cf..ccc36f7e774 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -561,6 +561,7 @@ def skip_if_suppress_immortalization():
# have subprocess or fork support.
is_emscripten = sys.platform == "emscripten"
is_wasi = sys.platform == "wasi"
+is_musl = sys.platform = "linux"

is_apple_mobile = sys.platform in {"ios", "tvos", "watchos"}
is_apple = is_apple_mobile or sys.platform == "darwin"
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 541ccdb3d09..4d5f8e982c8 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -1,7 +1,7 @@
# Python test set -- math module
# XXXX Should not do tests around zero only

-from test.support import verbose, requires_IEEE_754
+from test.support import is_musl, verbose, requires_IEEE_754
from test import support
import unittest
import fractions
@@ -2706,7 +2706,7 @@ def test_fma_infinities(self):
# gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008
# properly: it doesn't use the right sign when the result is zero.
@unittest.skipIf(
- sys.platform.startswith(("freebsd", "wasi"))
+ sys.platform.startswith(("freebsd", "wasi")) or is_musl
or (sys.platform == "android" and platform.machine() == "x86_64"),
f"this platform doesn't implement IEE 754-2008 properly")
def test_fma_zero_result(self):
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 2a46e058e95..a630f79a702 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1,6 +1,6 @@
from test.support import (gc_collect, bigmemtest, _2G,
cpython_only, captured_stdout,
- check_disallow_instantiation, is_emscripten, is_wasi,
+ check_disallow_instantiation, is_emscripten, is_musl, is_wasi,
warnings_helper, SHORT_TIMEOUT, CPUStopwatch, requires_resource)
import locale
import re
@@ -2016,7 +2016,7 @@ def test_bug_20998(self):
self.assertEqual(re.fullmatch('[a-c]+', 'ABC', re.I).span(), (0, 3))

@unittest.skipIf(
- is_emscripten or is_wasi,
+ is_emscripten or is_wasi or is_musl,
"musl libc issue on Emscripten/WASI, bpo-46390"
)
def test_locale_caching(self):
@@ -2056,7 +2056,7 @@ def check_en_US_utf8(self):
self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5'))

@unittest.skipIf(
- is_emscripten or is_wasi,
+ is_emscripten or is_wasi or is_musl,
"musl libc issue on Emscripten/WASI, bpo-46390"
)
def test_locale_compiled(self):

0 comments on commit 26a71a0

Please sign in to comment.