Skip to content

Commit ed9306a

Browse files
committed
Revert back to 3.8.3 and fix update.sh to wait for Windows binaries before bumping
1 parent 918d43b commit ed9306a

File tree

7 files changed

+32
-14
lines changed

7 files changed

+32
-14
lines changed

3.8/alpine3.11/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ENV LANG C.UTF-8
1818
RUN apk add --no-cache ca-certificates
1919

2020
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
21-
ENV PYTHON_VERSION 3.8.4
21+
ENV PYTHON_VERSION 3.8.3
2222

2323
RUN set -ex \
2424
&& apk add --no-cache --virtual .fetch-deps \

3.8/alpine3.12/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ENV LANG C.UTF-8
1818
RUN apk add --no-cache ca-certificates
1919

2020
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
21-
ENV PYTHON_VERSION 3.8.4
21+
ENV PYTHON_VERSION 3.8.3
2222

2323
RUN set -ex \
2424
&& apk add --no-cache --virtual .fetch-deps \

3.8/buster/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2121
&& rm -rf /var/lib/apt/lists/*
2222

2323
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
24-
ENV PYTHON_VERSION 3.8.4
24+
ENV PYTHON_VERSION 3.8.3
2525

2626
RUN set -ex \
2727
\

3.8/buster/slim/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2020
&& rm -rf /var/lib/apt/lists/*
2121

2222
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
23-
ENV PYTHON_VERSION 3.8.4
23+
ENV PYTHON_VERSION 3.8.3
2424

2525
RUN set -ex \
2626
\

3.8/windows/windowsservercore-1809/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:1809
88

99
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1010

11-
ENV PYTHON_VERSION 3.8.4
12-
ENV PYTHON_RELEASE 3.8.4
11+
ENV PYTHON_VERSION 3.8.3
12+
ENV PYTHON_RELEASE 3.8.3
1313

1414
RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
1515
Write-Host ('Downloading {0} ...' -f $url); \

3.8/windows/windowsservercore-ltsc2016/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2016
88

99
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
1010

11-
ENV PYTHON_VERSION 3.8.4
12-
ENV PYTHON_RELEASE 3.8.4
11+
ENV PYTHON_VERSION 3.8.3
12+
ENV PYTHON_RELEASE 3.8.3
1313

1414
RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \
1515
Write-Host ('Downloading {0} ...' -f $url); \

update.sh

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@ generated_warning() {
4949
EOH
5050
}
5151

52+
is_good_version() {
53+
local dir="$1"; shift
54+
local dirVersion="$1"; shift
55+
local fullVersion="$1"; shift
56+
57+
if ! wget -q -O /dev/null -o /dev/null --spider "https://www.python.org/ftp/python/$dirVersion/Python-$fullVersion.tar.xz"; then
58+
return 1
59+
fi
60+
61+
if [ -d "$dir/windows" ] && ! wget -q -O /dev/null -o /dev/null --spider "https://www.python.org/ftp/python/$dirVersion/python-$fullVersion-amd64.exe"; then
62+
return 1
63+
fi
64+
65+
return 0
66+
}
67+
5268
for version in "${versions[@]}"; do
5369
rcVersion="${version%-rc}"
5470
rcGrepV='-v'
@@ -76,8 +92,8 @@ for version in "${versions[@]}"; do
7692
for possible in "${possibles[@]}"; do
7793
rcPossible="${possible%%[a-z]*}"
7894

79-
# varnish is great until it isn't
80-
if wget -q -O /dev/null -o /dev/null --spider "https://www.python.org/ftp/python/$rcPossible/Python-$possible.tar.xz"; then
95+
# varnish is great until it isn't (usually the directory listing we scrape below is updated/uncached significantly later than the release being available)
96+
if is_good_version "$version" "$rcPossible" "$possible"; then
8197
fullVersion="$possible"
8298
break
8399
fi
@@ -94,10 +110,12 @@ for version in "${versions[@]}"; do
94110
| sort -rV \
95111
|| true
96112
) )
97-
if [ "${#possibleVersions[@]}" -gt 0 ]; then
98-
fullVersion="${possibleVersions[0]}"
99-
break
100-
fi
113+
for possibleVersion in "${possibleVersions[@]}"; do
114+
if is_good_version "$version" "$rcPossible" "$possibleVersion"; then
115+
fullVersion="$possibleVersion"
116+
break
117+
fi
118+
done
101119
done
102120

103121
if [ -z "$fullVersion" ]; then

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy