Skip to content

Commit 6c812a5

Browse files
authored
Drop PYTHONIOENCODING for Python >= 3.16 (#1144)
1 parent bd0f6ae commit 6c812a5

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎3.16-rc/windows/windowsservercore-ltsc2022/Dockerfile‎

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎3.16-rc/windows/windowsservercore-ltsc2025/Dockerfile‎

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Dockerfile-windows.template‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{{
2+
def rcVersion:
3+
env.version | rtrimstr("-rc")
4+
;
25
def extension:
36
.checksums.windows.url | split(".")[-1]
47
;
@@ -8,9 +11,14 @@
811
FROM mcr.microsoft.com/windows/{{ env.windowsVariant }}:{{ env.windowsRelease }}
912

1013
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
14+
{{ if rcVersion | IN("3.11", "3.12", "3.13", "3.14", "3.15") then ( -}}
1115

16+
{{ # only set PYTHONIOENCODING on versions less than 3.16 -}}
1217
# https://github.com/docker-library/python/pull/557
1318
ENV PYTHONIOENCODING UTF-8
19+
{{ # reproducer: docker run --rm python:{{ env.version }}-windowsservercore-{{ env.windowsRelease }} python -c 'print(chr(0x4e2d))' -}}
20+
{{ # https://github.com/docker-library/python/pull/1144#pullrequestreview-5634536246 -}}
21+
{{ ) else "" end -}}
1422
{{
1523
# installer sets path for older python, but needs to be set for the zip download
1624
if is_windows_zip then (

0 commit comments

Comments
 (0)