diff --git a/3.5/alpine3.10/Dockerfile b/3.5/alpine3.10/Dockerfile index a4132be9f..ba260f42f 100644 --- a/3.5/alpine3.10/Dockerfile +++ b/3.5/alpine3.10/Dockerfile @@ -76,7 +76,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.5/alpine3.9/Dockerfile b/3.5/alpine3.9/Dockerfile index 31cc02d79..7bae8d8cf 100644 --- a/3.5/alpine3.9/Dockerfile +++ b/3.5/alpine3.9/Dockerfile @@ -76,7 +76,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.5/buster/Dockerfile b/3.5/buster/Dockerfile index d0c5b8837..1b55849ab 100644 --- a/3.5/buster/Dockerfile +++ b/3.5/buster/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.5/buster/slim/Dockerfile b/3.5/buster/slim/Dockerfile index 07cf9831e..4be69566d 100644 --- a/3.5/buster/slim/Dockerfile +++ b/3.5/buster/slim/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.5/stretch/Dockerfile b/3.5/stretch/Dockerfile index f499671de..99c439f08 100644 --- a/3.5/stretch/Dockerfile +++ b/3.5/stretch/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.5/stretch/slim/Dockerfile b/3.5/stretch/slim/Dockerfile index 307a54a74..c2bafbfac 100644 --- a/3.5/stretch/slim/Dockerfile +++ b/3.5/stretch/slim/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.6/alpine3.10/Dockerfile b/3.6/alpine3.10/Dockerfile index 53348e814..464be7eb8 100644 --- a/3.6/alpine3.10/Dockerfile +++ b/3.6/alpine3.10/Dockerfile @@ -78,7 +78,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.6/alpine3.9/Dockerfile b/3.6/alpine3.9/Dockerfile index 44b97df25..7caa55b46 100644 --- a/3.6/alpine3.9/Dockerfile +++ b/3.6/alpine3.9/Dockerfile @@ -78,7 +78,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.6/buster/Dockerfile b/3.6/buster/Dockerfile index af1540aba..73dd5999e 100644 --- a/3.6/buster/Dockerfile +++ b/3.6/buster/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.6/buster/slim/Dockerfile b/3.6/buster/slim/Dockerfile index 24a8b81a6..34e5eef03 100644 --- a/3.6/buster/slim/Dockerfile +++ b/3.6/buster/slim/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.6/stretch/Dockerfile b/3.6/stretch/Dockerfile index d5aaff5a0..5fb014267 100644 --- a/3.6/stretch/Dockerfile +++ b/3.6/stretch/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.6/stretch/slim/Dockerfile b/3.6/stretch/slim/Dockerfile index 3527c8967..52b04833e 100644 --- a/3.6/stretch/slim/Dockerfile +++ b/3.6/stretch/slim/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.7/alpine3.10/Dockerfile b/3.7/alpine3.10/Dockerfile index a4f779221..b4d93d57b 100644 --- a/3.7/alpine3.10/Dockerfile +++ b/3.7/alpine3.10/Dockerfile @@ -79,7 +79,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.7/alpine3.9/Dockerfile b/3.7/alpine3.9/Dockerfile index c262944f0..9a9c6e37d 100644 --- a/3.7/alpine3.9/Dockerfile +++ b/3.7/alpine3.9/Dockerfile @@ -79,7 +79,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.7/buster/Dockerfile b/3.7/buster/Dockerfile index 341213a6b..88e95d163 100644 --- a/3.7/buster/Dockerfile +++ b/3.7/buster/Dockerfile @@ -46,7 +46,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.7/buster/slim/Dockerfile b/3.7/buster/slim/Dockerfile index a58b2e6a3..4cd913148 100644 --- a/3.7/buster/slim/Dockerfile +++ b/3.7/buster/slim/Dockerfile @@ -69,7 +69,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.7/stretch/Dockerfile b/3.7/stretch/Dockerfile index 2f0ad9e33..f39c447bf 100644 --- a/3.7/stretch/Dockerfile +++ b/3.7/stretch/Dockerfile @@ -46,7 +46,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.7/stretch/slim/Dockerfile b/3.7/stretch/slim/Dockerfile index b5d7f3b6d..e9185db4e 100644 --- a/3.7/stretch/slim/Dockerfile +++ b/3.7/stretch/slim/Dockerfile @@ -69,7 +69,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/3.8-rc/alpine3.10/Dockerfile b/3.8-rc/alpine3.10/Dockerfile index 8be293a9f..b8e91d525 100644 --- a/3.8-rc/alpine3.10/Dockerfile +++ b/3.8-rc/alpine3.10/Dockerfile @@ -79,42 +79,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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ && make install \ \ && find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ diff --git a/3.8-rc/buster/Dockerfile b/3.8-rc/buster/Dockerfile index beec91450..5eee590b1 100644 --- a/3.8-rc/buster/Dockerfile +++ b/3.8-rc/buster/Dockerfile @@ -46,42 +46,6 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ && make install \ && ldconfig \ \ diff --git a/3.8-rc/buster/slim/Dockerfile b/3.8-rc/buster/slim/Dockerfile index 7fe9d6f05..a34e93c05 100644 --- a/3.8-rc/buster/slim/Dockerfile +++ b/3.8-rc/buster/slim/Dockerfile @@ -69,42 +69,6 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - ' \ && make install \ && ldconfig \ \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 4ad0db0e9..2efe5675a 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -73,7 +73,7 @@ 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" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index b07f4ceb2..952aaabff 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -42,7 +42,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 1413e34a9..d9b1c3c50 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -63,7 +63,7 @@ RUN set -ex \ --with-system-ffi \ --without-ensurepip \ && make -j "$(nproc)" \ -# https://github.com/docker-library/python/issues/160#issuecomment-509426916 +# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ test_base64 \ diff --git a/update.sh b/update.sh index 71fc8ba1f..41077d601 100755 --- a/update.sh +++ b/update.sh @@ -153,20 +153,20 @@ for version in "${versions[@]}"; do -e 's!^(FROM (debian|buildpack-deps|alpine|mcr[.]microsoft[.]com/[^:]+)):.*!\1:'"$tag"'!' \ "$dir/Dockerfile" - case "$version/$v" in + case "$rcVersion/$v" in # Libraries to build the nis module only available in Alpine 3.7+. # Also require this patch https://bugs.python.org/issue32521 only available in Python 2.7, 3.6+. - 3.5*/alpine*) + 3.5/alpine*) sed -ri -e '/libnsl-dev/d' -e '/libtirpc-dev/d' "$dir/Dockerfile" ;;& # (3.5*/alpine* needs to match the next blocks too) # https://bugs.python.org/issue11063, https://bugs.python.org/issue20519 (Python 3.7.0+) # A new native _uuid module improves uuid import time and avoids using ctypes. # This requires the development libuuid headers. - 3.[5-6]*/alpine*) + 3.[5-6]/alpine*) sed -ri -e '/util-linux-dev/d' "$dir/Dockerfile" ;; - 3.[5-6]*) + 3.[5-6]/*) sed -ri -e '/uuid-dev/d' "$dir/Dockerfile" ;;& # (other Debian variants need to match later blocks) */buster | */stretch) @@ -175,6 +175,17 @@ for version in "${versions[@]}"; do ;; esac + major="${rcVersion%%.*}" + minor="${rcVersion#$major.}" + minor="${minor%%.*}" + if [ "$major" -gt 3 ] || { [ "$major" -eq 3 ] && [ "$minor" -ge 8 ]; }; then + # PROFILE_TASK has a reasonable default starting in 3.8+; see: + # https://bugs.python.org/issue36044 + # https://github.com/python/cpython/pull/14702 + # https://github.com/python/cpython/pull/14910 + perl -0 -i -p -e "s![^\n]+PROFILE_TASK(='[^']+?')?[^\n]+\n!!gs" "$dir/Dockerfile" + fi + case "$v" in windows/*-1803) travisEnv='\n - os: windows\n dist: 1803-containers\n env: VERSION='"$version VARIANT=$v$travisEnv"