Skip to content

Conversation

@tianon
Copy link
Member

@tianon tianon commented Apr 19, 2022

Changes:

- docker-library/python@1cf43e7: Merge pull request docker-library/python#719 from docker-library/revert-570-lang_env_removed
- docker-library/python@f871d04: Revert "Removing LANG env var (docker-library/python#570)"
@github-actions
Copy link

Diff for be64d49:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 72b396e..c91fda8 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -3,95 +3,95 @@ GitRepo: https://github.com/docker-library/python.git
 
 Tags: 3.7.13-alpine3.14, 3.7-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.7/alpine3.14
 
 Tags: 3.7.13-alpine3.15, 3.7-alpine3.15, 3.7.13-alpine, 3.7-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.7/alpine3.15
 
 Tags: 3.7.13-bullseye, 3.7-bullseye
 SharedTags: 3.7.13, 3.7
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.7/bullseye
 
 Tags: 3.7.13-buster, 3.7-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.7/buster
 
 Tags: 3.7.13-slim-bullseye, 3.7-slim-bullseye, 3.7.13-slim, 3.7-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.7/slim-bullseye
 
 Tags: 3.7.13-slim-buster, 3.7-slim-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.7/slim-buster
 
 Tags: 3.8.13-alpine3.14, 3.8-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.8/alpine3.14
 
 Tags: 3.8.13-alpine3.15, 3.8-alpine3.15, 3.8.13-alpine, 3.8-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.8/alpine3.15
 
 Tags: 3.8.13-bullseye, 3.8-bullseye
 SharedTags: 3.8.13, 3.8
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.8/bullseye
 
 Tags: 3.8.13-buster, 3.8-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.8/buster
 
 Tags: 3.8.13-slim-bullseye, 3.8-slim-bullseye, 3.8.13-slim, 3.8-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.8/slim-bullseye
 
 Tags: 3.8.13-slim-buster, 3.8-slim-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.8/slim-buster
 
 Tags: 3.9.12-alpine3.14, 3.9-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.9/alpine3.14
 
 Tags: 3.9.12-alpine3.15, 3.9-alpine3.15, 3.9.12-alpine, 3.9-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.9/alpine3.15
 
 Tags: 3.9.12-bullseye, 3.9-bullseye
 SharedTags: 3.9.12, 3.9
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.9/bullseye
 
 Tags: 3.9.12-buster, 3.9-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.9/buster
 
 Tags: 3.9.12-slim-bullseye, 3.9-slim-bullseye, 3.9.12-slim, 3.9-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.9/slim-bullseye
 
 Tags: 3.9.12-slim-buster, 3.9-slim-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.9/slim-buster
 
 Tags: 3.9.12-windowsservercore-1809, 3.9-windowsservercore-1809
@@ -110,33 +110,33 @@ Constraints: windowsservercore-ltsc2022
 
 Tags: 3.10.4-alpine3.14, 3.10-alpine3.14, 3-alpine3.14, alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.10/alpine3.14
 
 Tags: 3.10.4-alpine3.15, 3.10-alpine3.15, 3-alpine3.15, alpine3.15, 3.10.4-alpine, 3.10-alpine, 3-alpine, alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.10/alpine3.15
 
 Tags: 3.10.4-bullseye, 3.10-bullseye, 3-bullseye, bullseye
 SharedTags: 3.10.4, 3.10, 3, latest
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.10/bullseye
 
 Tags: 3.10.4-buster, 3.10-buster, 3-buster, buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.10/buster
 
 Tags: 3.10.4-slim-bullseye, 3.10-slim-bullseye, 3-slim-bullseye, slim-bullseye, 3.10.4-slim, 3.10-slim, 3-slim, slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.10/slim-bullseye
 
 Tags: 3.10.4-slim-buster, 3.10-slim-buster, 3-slim-buster, slim-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.10/slim-buster
 
 Tags: 3.10.4-windowsservercore-1809, 3.10-windowsservercore-1809, 3-windowsservercore-1809, windowsservercore-1809
@@ -155,33 +155,33 @@ Constraints: windowsservercore-ltsc2022
 
 Tags: 3.11.0a7-alpine3.14, 3.11-rc-alpine3.14
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.11-rc/alpine3.14
 
 Tags: 3.11.0a7-alpine3.15, 3.11-rc-alpine3.15, 3.11.0a7-alpine, 3.11-rc-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.11-rc/alpine3.15
 
 Tags: 3.11.0a7-bullseye, 3.11-rc-bullseye
 SharedTags: 3.11.0a7, 3.11-rc
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.11-rc/bullseye
 
 Tags: 3.11.0a7-buster, 3.11-rc-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.11-rc/buster
 
 Tags: 3.11.0a7-slim-bullseye, 3.11-rc-slim-bullseye, 3.11.0a7-slim, 3.11-rc-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.11-rc/slim-bullseye
 
 Tags: 3.11.0a7-slim-buster, 3.11-rc-slim-buster
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 0b9aee903589af7182db9dfc8cb1f5203332a92f
+GitCommit: f871d0435e7f35a693fa1b60aa159e6a1a4c6a2e
 Directory: 3.11-rc/slim-buster
 
 Tags: 3.11.0a7-windowsservercore-1809, 3.11-rc-windowsservercore-1809
diff --git a/python_3.11-rc-alpine/Dockerfile b/python_3.11-rc-alpine/Dockerfile
index e63a8a0..09eb8fd 100644
--- a/python_3.11-rc-alpine/Dockerfile
+++ b/python_3.11-rc-alpine/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.15
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.11-rc-alpine3.14/Dockerfile b/python_3.11-rc-alpine3.14/Dockerfile
index 701ae2b..ba48cde 100644
--- a/python_3.11-rc-alpine3.14/Dockerfile
+++ b/python_3.11-rc-alpine3.14/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.14
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.11-rc-bullseye/Dockerfile b/python_3.11-rc-bullseye/Dockerfile
index 2016d04..d773786 100644
--- a/python_3.11-rc-bullseye/Dockerfile
+++ b/python_3.11-rc-bullseye/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:bullseye
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.11-rc-buster/Dockerfile b/python_3.11-rc-buster/Dockerfile
index d1857b3..26aca6c 100644
--- a/python_3.11-rc-buster/Dockerfile
+++ b/python_3.11-rc-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:buster
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.11-rc-slim-buster/Dockerfile b/python_3.11-rc-slim-buster/Dockerfile
index 2bd5870..ff1a4b9 100644
--- a/python_3.11-rc-slim-buster/Dockerfile
+++ b/python_3.11-rc-slim-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:buster-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.11-rc-slim/Dockerfile b/python_3.11-rc-slim/Dockerfile
index 071f552..f3727f0 100644
--- a/python_3.11-rc-slim/Dockerfile
+++ b/python_3.11-rc-slim/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:bullseye-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.7-alpine/Dockerfile b/python_3.7-alpine/Dockerfile
index a5c4317..6b90908 100644
--- a/python_3.7-alpine/Dockerfile
+++ b/python_3.7-alpine/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.15
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.7-alpine3.14/Dockerfile b/python_3.7-alpine3.14/Dockerfile
index 3928f5d..8ed2a66 100644
--- a/python_3.7-alpine3.14/Dockerfile
+++ b/python_3.7-alpine3.14/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.14
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.7-bullseye/Dockerfile b/python_3.7-bullseye/Dockerfile
index 99c3d92..62c78d8 100644
--- a/python_3.7-bullseye/Dockerfile
+++ b/python_3.7-bullseye/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:bullseye
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.7-buster/Dockerfile b/python_3.7-buster/Dockerfile
index 1d9009a..e13d019 100644
--- a/python_3.7-buster/Dockerfile
+++ b/python_3.7-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:buster
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.7-slim-buster/Dockerfile b/python_3.7-slim-buster/Dockerfile
index 840b07c..63a07bd 100644
--- a/python_3.7-slim-buster/Dockerfile
+++ b/python_3.7-slim-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:buster-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.7-slim/Dockerfile b/python_3.7-slim/Dockerfile
index d9f1ed3..def3821 100644
--- a/python_3.7-slim/Dockerfile
+++ b/python_3.7-slim/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:bullseye-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.8-alpine/Dockerfile b/python_3.8-alpine/Dockerfile
index 7f1fdc1..87e405a 100644
--- a/python_3.8-alpine/Dockerfile
+++ b/python_3.8-alpine/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.15
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.8-alpine3.14/Dockerfile b/python_3.8-alpine3.14/Dockerfile
index 8cd0e1e..b8a033e 100644
--- a/python_3.8-alpine3.14/Dockerfile
+++ b/python_3.8-alpine3.14/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.14
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.8-bullseye/Dockerfile b/python_3.8-bullseye/Dockerfile
index 91de2e4..f4055a2 100644
--- a/python_3.8-bullseye/Dockerfile
+++ b/python_3.8-bullseye/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:bullseye
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.8-buster/Dockerfile b/python_3.8-buster/Dockerfile
index d27955a..74caf60 100644
--- a/python_3.8-buster/Dockerfile
+++ b/python_3.8-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:buster
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.8-slim-buster/Dockerfile b/python_3.8-slim-buster/Dockerfile
index add71d5..2bf7427 100644
--- a/python_3.8-slim-buster/Dockerfile
+++ b/python_3.8-slim-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:buster-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.8-slim/Dockerfile b/python_3.8-slim/Dockerfile
index beba07e..26aa080 100644
--- a/python_3.8-slim/Dockerfile
+++ b/python_3.8-slim/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:bullseye-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.9-alpine/Dockerfile b/python_3.9-alpine/Dockerfile
index 28322ad..fd96682 100644
--- a/python_3.9-alpine/Dockerfile
+++ b/python_3.9-alpine/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.15
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.9-alpine3.14/Dockerfile b/python_3.9-alpine3.14/Dockerfile
index d989c73..ff25c7d 100644
--- a/python_3.9-alpine3.14/Dockerfile
+++ b/python_3.9-alpine3.14/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.14
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_3.9-bullseye/Dockerfile b/python_3.9-bullseye/Dockerfile
index 7f43112..9f277f5 100644
--- a/python_3.9-bullseye/Dockerfile
+++ b/python_3.9-bullseye/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:bullseye
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.9-buster/Dockerfile b/python_3.9-buster/Dockerfile
index 477a484..cd7252c 100644
--- a/python_3.9-buster/Dockerfile
+++ b/python_3.9-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:buster
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.9-slim-buster/Dockerfile b/python_3.9-slim-buster/Dockerfile
index b758ace..7ff174c 100644
--- a/python_3.9-slim-buster/Dockerfile
+++ b/python_3.9-slim-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:buster-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_3.9-slim/Dockerfile b/python_3.9-slim/Dockerfile
index b1b4045..8604e34 100644
--- a/python_3.9-slim/Dockerfile
+++ b/python_3.9-slim/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:bullseye-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_alpine/Dockerfile b/python_alpine/Dockerfile
index 299b1e5..1d742b9 100644
--- a/python_alpine/Dockerfile
+++ b/python_alpine/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.15
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_alpine3.14/Dockerfile b/python_alpine3.14/Dockerfile
index 6cfe506..01515ef 100644
--- a/python_alpine3.14/Dockerfile
+++ b/python_alpine3.14/Dockerfile
@@ -9,6 +9,10 @@ FROM alpine:3.14
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apk add --no-cache \
diff --git a/python_bullseye/Dockerfile b/python_bullseye/Dockerfile
index aa76b43..8677eed 100644
--- a/python_bullseye/Dockerfile
+++ b/python_bullseye/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:bullseye
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_buster/Dockerfile b/python_buster/Dockerfile
index d402d8b..d602e2c 100644
--- a/python_buster/Dockerfile
+++ b/python_buster/Dockerfile
@@ -9,6 +9,10 @@ FROM buildpack-deps:buster
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_slim-buster/Dockerfile b/python_slim-buster/Dockerfile
index 1f5dc32..f7ba6cd 100644
--- a/python_slim-buster/Dockerfile
+++ b/python_slim-buster/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:buster-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \
diff --git a/python_slim/Dockerfile b/python_slim/Dockerfile
index 5fa60f1..b6edad9 100644
--- a/python_slim/Dockerfile
+++ b/python_slim/Dockerfile
@@ -9,6 +9,10 @@ FROM debian:bullseye-slim
 # ensure local python is preferred over distribution python
 ENV PATH /usr/local/bin:$PATH
 
+# http://bugs.python.org/issue19846
+# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
+ENV LANG C.UTF-8
+
 # runtime dependencies
 RUN set -eux; \
 	apt-get update; \

Relevant Maintainers:

@yosifkit yosifkit merged commit d843db4 into docker-library:master Apr 19, 2022
@yosifkit yosifkit deleted the python branch April 19, 2022 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants