Skip to content

Add python 3.13 GA release #972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 3.13-rc/bookworm/Dockerfile → 3.13/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 3.13-rc/bullseye/Dockerfile → 3.13/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 0 additions & 143 deletions 3.8/alpine3.19/Dockerfile

This file was deleted.

143 changes: 0 additions & 143 deletions 3.8/alpine3.20/Dockerfile

This file was deleted.

113 changes: 0 additions & 113 deletions 3.8/bookworm/Dockerfile

This file was deleted.

113 changes: 0 additions & 113 deletions 3.8/bullseye/Dockerfile

This file was deleted.

147 changes: 0 additions & 147 deletions 3.8/slim-bookworm/Dockerfile

This file was deleted.

147 changes: 0 additions & 147 deletions 3.8/slim-bullseye/Dockerfile

This file was deleted.

30 changes: 9 additions & 21 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ FROM buildpack-deps:{{ env.variant }}
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH

{{ if [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | index(rcVersion) then ( -}}
{{ if [ "3.9", "3.10", "3.11", "3.12" ] | index(rcVersion) then ( -}}
{{ # only set LANG on versions less than 3.13 -}}
# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed
# last attempted removal of LANG broke many users:
@@ -53,25 +53,21 @@ RUN set -eux; \

ENV GPG_KEY {{
{
# gpg: key B26995E310250568: public key "\xc5\x81ukasz Langa (GPG langa.pl) <lukasz@langa.pl>" imported
"3.8": "E3FF2839C048B25C084DEBE9B26995E310250568",
# https://www.python.org/dev/peps/pep-0569/#release-manager-and-crew

# gpg: key B26995E310250568: public key "\xc5\x81ukasz Langa (GPG langa.pl) <lukasz@langa.pl>" imported
"3.9": "E3FF2839C048B25C084DEBE9B26995E310250568",
# https://www.python.org/dev/peps/pep-0596/#release-manager-and-crew
# https://peps.python.org/pep-0596/#release-manager-and-crew

# gpg: key 64E628F8D684696D: public key "Pablo Galindo Salgado <pablogsal@gmail.com>" imported
"3.10": "A035C8C19219BA821ECEA86B64E628F8D684696D",
# https://www.python.org/dev/peps/pep-0619/#release-manager-and-crew
# https://peps.python.org/pep-0619/#release-manager-and-crew

# gpg: key 64E628F8D684696D: public key "Pablo Galindo Salgado <pablogsal@gmail.com>" imported
"3.11": "A035C8C19219BA821ECEA86B64E628F8D684696D",
# https://www.python.org/dev/peps/pep-0664/#release-manager-and-crew
# https://peps.python.org/pep-0664/#release-manager-and-crew

# gpg: key A821E680E5FA6305: public key "Thomas Wouters <thomas@python.org>" imported
"3.12": "7169605F62C751356D054A26A821E680E5FA6305",
# https://www.python.org/dev/peps/pep-0693/#release-manager-and-crew
# https://peps.python.org/pep-0693/#release-manager-and-crew

# gpg: key A821E680E5FA6305: public key "Thomas Wouters <thomas@python.org>" imported
"3.13": "7169605F62C751356D054A26A821E680E5FA6305",
@@ -159,9 +155,9 @@ RUN set -eux; \
--build="$gnuArch" \
--enable-loadable-sqlite-extensions \
{{
# skip optimizations on alpine on riscv64 (except python 3.8 and 3.9)
# only 3.8 and 3.9 complete building on riscv64 with optimizations, 3.10-3.13rc all hit the 3 hour limit
if (is_alpine | not) or ( [ "3.8", "3.9" ] | index(rcVersion) ) then (
# skip optimizations on alpine on riscv64 (except python 3.9)
# only 3.9 completes building on riscv64 with optimizations, 3.10-3.13 all hit the 3 hour limit
if (is_alpine | not) or ( [ "3.9" ] | index(rcVersion) ) then (
-}}
--enable-optimizations \
{{ ) else ( -}}
@@ -171,7 +167,7 @@ RUN set -eux; \
--enable-shared \
{{
# <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance
if [ "3.8", "3.9" ] | index(rcVersion) then "" else (
if [ "3.9" ] | index(rcVersion) then "" else (
-}}
--with-lto \
{{ ) end -}}
@@ -221,14 +217,6 @@ RUN set -eux; \
\( \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \
{{ if [ "3.8" ] | index(env.version) then ( -}}
-o \( -type f -a -name 'wininst-*.exe' \) \
{{
) else
# "wininst-*.exe" is not installed for Unix platforms on Python 3.9+: https://github.com/python/cpython/pull/14511
""
end
-}}
\) -exec rm -rf '{}' + \
; \
\
4 changes: 2 additions & 2 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
set -Eeuo pipefail

declare -A aliases=(
[3.12]='3 latest'
[3.13]='3 latest'
)

self="$(basename "$BASH_SOURCE")"
@@ -137,7 +137,7 @@ for version; do
esac

case "$version" in
3.8 | 3.9) ;;
3.9) ;;
*)
if [ "$version" != '3.10' ]; then
# https://github.com/docker-library/python/pull/931
18 changes: 2 additions & 16 deletions versions.json
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
],
"version": "3.12.7"
},
"3.13-rc": {
"3.13": {
"variants": [
"bookworm",
"slim-bookworm",
@@ -51,21 +51,7 @@
"windows/windowsservercore-ltsc2022",
"windows/windowsservercore-1809"
],
"version": "3.13.0rc3"
},
"3.8": {
"setuptools": {
"version": "57.5.0"
},
"variants": [
"bookworm",
"slim-bookworm",
"bullseye",
"slim-bullseye",
"alpine3.20",
"alpine3.19"
],
"version": "3.8.20"
"version": "3.13.0"
},
"3.9": {
"setuptools": {
10 changes: 1 addition & 9 deletions versions.sh
Original file line number Diff line number Diff line change
@@ -126,7 +126,7 @@ for version in "${versions[@]}"; do
# TODO remove setuptools version handling entirely once Python 3.11 is EOL
setuptoolsVersion="$(sed -nre 's/^_SETUPTOOLS_VERSION[[:space:]]*=[[:space:]]*"(.*?)".*/\1/p' <<<"$ensurepipVersions")"
case "$rcVersion" in
3.8 | 3.9 | 3.10 | 3.11)
3.9 | 3.10 | 3.11)
if [ -z "$setuptoolsVersion" ]; then
echo >&2 "error: $version: missing setuptools version"
exit 1
@@ -136,14 +136,6 @@ for version in "${versions[@]}"; do
exit 1
fi

# TODO remove this once Python 3.8 is either "new enough setuptools" or EOL
setuptoolsVersion="$(
{
echo "$setuptoolsVersion"
echo "$minimumSetuptoolsVersion"
} | sort -rV | head -1
)"

# https://github.com/docker-library/python/issues/781 (TODO remove this if 3.10 and 3.11 embed a newer setuptools and this section no longer applies)
if [ "$setuptoolsVersion" = '65.5.0' ]; then
setuptoolsVersion='65.5.1'
Loading