Skip to content

Commit

Permalink
Python 3.10 / bugfix 3.9 - 3.8 (#167)
Browse files Browse the repository at this point in the history
Co-authored-by: Franck Nijhof <[email protected]>
  • Loading branch information
pvizeli and frenck authored May 10, 2022
1 parent e4ee5e6 commit fa6c4bd
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 57 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
DEBIAN_LATEST: "bullseye"
UBUNTU_LATEST: "20.4"
RASPBIAN_LATEST: "bullseye"
PYTHON_LATEST: "3.9"
PYTHON_LATEST: "3.10"

jobs:
init:
Expand Down Expand Up @@ -261,8 +261,8 @@ jobs:
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures_alpine) }}
version: ["3.12", "3.13", "3.14"]
python: ["3.7", "3.8", "3.9"]
version: ["3.13", "3.14", "3.15"]
python: ["3.8", "3.9", "3.10"]
steps:
- name: Checkout the repository
uses: actions/checkout@v2
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.7, 3.8, 3.9, 3.7-alpine.3.12, 3.7-alpine.3.13, 3.7-alpine.3.14, 3.8-alpine.3.12, 3.8-alpine3.13, 3.8-alpine3.14, 3.9-alpine3.12, 3.9-alpine3.13, 3.9-alpine3.14 | 3.9-alpine.3.14 |
| armv7-base-python | Alpine | 3.7, 3.8, 3.9, 3.7-alpine.3.12, 3.7-alpine.3.13, 3.7-alpine.3.14, 3.8-alpine.3.12, 3.8-alpine3.13, 3.8-alpine3.14, 3.9-alpine3.12, 3.9-alpine3.13, 3.9-alpine3.14 | 3.9-alpine.3.14 |
| aarch64-base-python | Alpine | 3.7, 3.8, 3.9, 3.7-alpine.3.12, 3.7-alpine.3.13, 3.7-alpine.3.14, 3.8-alpine.3.12, 3.8-alpine3.13, 3.8-alpine3.14, 3.9-alpine3.12, 3.9-alpine3.13, 3.9-alpine3.14 | 3.9-alpine.3.14 |
| amd64-base-python | Alpine | 3.7, 3.8, 3.9, 3.7-alpine.3.12, 3.7-alpine.3.13, 3.7-alpine.3.14, 3.8-alpine.3.12, 3.8-alpine3.13, 3.8-alpine3.14, 3.9-alpine3.12, 3.9-alpine3.13, 3.9-alpine3.14 | 3.9-alpine.3.14 |
| i386-base-python | Alpine | 3.7, 3.8, 3.9, 3.7-alpine.3.12, 3.7-alpine.3.13, 3.7-alpine.3.14, 3.8-alpine.3.12, 3.8-alpine3.13, 3.8-alpine3.14, 3.9-alpine3.12, 3.9-alpine3.13, 3.9-alpine3.14 | 3.9-alpine.3.14 |
| armhf-base-python | Alpine | 3.8, 3.9, 3.10, 3.8-alpine.3.13, 3.8-alpine.3.14, 3.8-alpine.3.15, 3.9-alpine.3.13, 3.9-alpine3.14, 3.9-alpine3.15, 3.10-alpine3.13, 3.10-alpine3.14, 3.10-alpine3.15 | 3.10-alpine.3.15 |
| armv7-base-python | Alpine | 3.8, 3.9, 3.10, 3.8-alpine.3.13, 3.8-alpine.3.14, 3.8-alpine.3.15, 3.9-alpine.3.13, 3.9-alpine3.14, 3.9-alpine3.15, 3.10-alpine3.13, 3.10-alpine3.14, 3.10-alpine3.15 | 3.10-alpine.3.15 |
| aarch64-base-python | Alpine | 3.8, 3.9, 3.10, 3.8-alpine.3.13, 3.8-alpine.3.14, 3.8-alpine.3.15, 3.9-alpine.3.13, 3.9-alpine3.14, 3.9-alpine3.15, 3.10-alpine3.13, 3.10-alpine3.14, 3.10-alpine3.15 | 3.10-alpine.3.15 |
| amd64-base-python | Alpine | 3.8, 3.9, 3.10, 3.8-alpine.3.13, 3.8-alpine.3.14, 3.8-alpine.3.15, 3.9-alpine.3.13, 3.9-alpine3.14, 3.9-alpine3.15, 3.10-alpine3.13, 3.10-alpine3.14, 3.10-alpine3.15 | 3.10-alpine.3.15 |
| i386-base-python | Alpine | 3.8, 3.9, 3.10, 3.8-alpine.3.13, 3.8-alpine.3.14, 3.8-alpine.3.15, 3.9-alpine.3.13, 3.9-alpine3.14, 3.9-alpine3.15, 3.10-alpine3.13, 3.10-alpine3.14, 3.10-alpine3.15 | 3.10-alpine.3.15 |

## Others

Expand Down
46 changes: 1 addition & 45 deletions python/3.7/Dockerfile → python/3.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN set -ex \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
Expand All @@ -82,51 +83,6 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044
PROFILE_TASK='-m test.regrtest --pgo \
test_asyncio \
test_array \
test_base64 \
test_binascii \
test_binop \
test_bisect \
test_bytes \
test_cmath \
test_codecs \
test_collections \
test_complex \
test_dataclasses \
test_datetime \
test_decimal \
test_difflib \
test_embed \
test_float \
test_fstring \
test_functools \
test_generators \
test_hashlib \
test_heapq \
test_int \
test_itertools \
test_json \
test_long \
test_math \
test_memoryview \
test_operator \
test_ordered_dict \
test_pickle \
test_pprint \
test_re \
test_set \
test_sqlite \
test_statistics \
test_struct \
test_tabnanny \
test_time \
test_unicode \
test_xml_etree \
test_xml_etree_c \
' \
&& make install \
\
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions python/3.10/asynctio_unix_events.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index f34a5b4b44..b1d0f1e61e 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -369,6 +369,11 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
fut.set_result(total_sent)
return

+ # On 32-bit architectures truncate to 1GiB to avoid OverflowError,
+ # see bpo-38319.
+ if sys.maxsize < 2 ** 32:
+ blocksize = min(blocksize, 2 ** 30)
+
try:
sent = os.sendfile(fd, fileno, offset, blocksize)
except (BlockingIOError, InterruptedError):
4 changes: 2 additions & 2 deletions python/3.7/build.yaml → python/3.10/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ codenotary:
signer: [email protected]
base_image: [email protected]
args:
PYTHON_VERSION: 3.7.12
PYTHON_VERSION: 3.10.4
PIP_VERSION: 22.0.3
GPG_KEY: 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
GPG_KEY: A035C8C19219BA821ECEA86B64E628F8D684696D
labels:
io.hass.base.name: python
org.opencontainers.image.source: https://github.com/home-assistant/docker-base
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion python/3.8/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ codenotary:
signer: [email protected]
base_image: [email protected]
args:
PYTHON_VERSION: 3.8.12
PYTHON_VERSION: 3.8.13
PIP_VERSION: 22.0.3
GPG_KEY: E3FF2839C048B25C084DEBE9B26995E310250568
labels:
Expand Down
2 changes: 1 addition & 1 deletion python/3.9/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ codenotary:
signer: [email protected]
base_image: [email protected]
args:
PYTHON_VERSION: 3.9.9
PYTHON_VERSION: 3.9.12
PIP_VERSION: 22.0.3
GPG_KEY: E3FF2839C048B25C084DEBE9B26995E310250568
labels:
Expand Down

0 comments on commit fa6c4bd

Please sign in to comment.