diff --git a/3.13/alpine3.21/Dockerfile b/3.13/alpine3.21/Dockerfile index 1c9b7356e..d6f29a256 100644 --- a/3.13/alpine3.21/Dockerfile +++ b/3.13/alpine3.21/Dockerfile @@ -73,6 +73,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.13/alpine3.22/Dockerfile b/3.13/alpine3.22/Dockerfile index 735b364a5..49edee75b 100644 --- a/3.13/alpine3.22/Dockerfile +++ b/3.13/alpine3.22/Dockerfile @@ -73,6 +73,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.13/bookworm/Dockerfile b/3.13/bookworm/Dockerfile index ea88fd230..2114144f9 100644 --- a/3.13/bookworm/Dockerfile +++ b/3.13/bookworm/Dockerfile @@ -47,6 +47,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.13/slim-bookworm/Dockerfile b/3.13/slim-bookworm/Dockerfile index cf5b27355..092fab17f 100644 --- a/3.13/slim-bookworm/Dockerfile +++ b/3.13/slim-bookworm/Dockerfile @@ -72,6 +72,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.13/slim-trixie/Dockerfile b/3.13/slim-trixie/Dockerfile index a9ce14210..b407b6a40 100644 --- a/3.13/slim-trixie/Dockerfile +++ b/3.13/slim-trixie/Dockerfile @@ -72,6 +72,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.13/trixie/Dockerfile b/3.13/trixie/Dockerfile index 83926929f..608c2604c 100644 --- a/3.13/trixie/Dockerfile +++ b/3.13/trixie/Dockerfile @@ -47,6 +47,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/alpine3.21/Dockerfile b/3.14-rc/alpine3.21/Dockerfile index 5f46f3b9e..66ca2737d 100644 --- a/3.14-rc/alpine3.21/Dockerfile +++ b/3.14-rc/alpine3.21/Dockerfile @@ -66,6 +66,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.14-rc/alpine3.22/Dockerfile b/3.14-rc/alpine3.22/Dockerfile index 1f30afa17..cd97bbc5f 100644 --- a/3.14-rc/alpine3.22/Dockerfile +++ b/3.14-rc/alpine3.22/Dockerfile @@ -66,6 +66,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.14-rc/bookworm/Dockerfile b/3.14-rc/bookworm/Dockerfile index 4fe403475..6aedd2496 100644 --- a/3.14-rc/bookworm/Dockerfile +++ b/3.14-rc/bookworm/Dockerfile @@ -40,6 +40,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/slim-bookworm/Dockerfile b/3.14-rc/slim-bookworm/Dockerfile index f0cf17438..be10f8f0c 100644 --- a/3.14-rc/slim-bookworm/Dockerfile +++ b/3.14-rc/slim-bookworm/Dockerfile @@ -65,6 +65,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/slim-trixie/Dockerfile b/3.14-rc/slim-trixie/Dockerfile index d79750465..177037ea5 100644 --- a/3.14-rc/slim-trixie/Dockerfile +++ b/3.14-rc/slim-trixie/Dockerfile @@ -65,6 +65,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/trixie/Dockerfile b/3.14-rc/trixie/Dockerfile index d262a8323..dbe526339 100644 --- a/3.14-rc/trixie/Dockerfile +++ b/3.14-rc/trixie/Dockerfile @@ -40,6 +40,8 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index b0ee03d7f..fef277a1c 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -192,6 +192,10 @@ RUN set -eux; \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ {{ ) end -}} --with-ensurepip \ +{{ if IN(rcVersion; "3.9", "3.10", "3.11", "3.12") then "" else ( -}} +# https://github.com/docker-library/python/issues/947 + --disable-gil \ +{{ ) end -}} ; \ nproc="$(nproc)"; \ {{ if is_alpine then ( -}}