Sign inSign up

j4ckofalltrades/legacy-python

By j4ckofalltrades

Updated about 2 months ago

Base images for legacy Python versions 0.9.1, 1.x, 2.x, and 3.x

Image
Languages & frameworks
0

1.6K

j4ckofalltrades/legacy-python repository overview

Legacy Python

Base images for end-of-life Python versions (0.9.1, 1.x, 2.x, and select 3.x releases). More recent versions of Python 3 are readily available through the official Docker Python image and version management tools like pyenv or uv.

Usage

Build and run locally
docker build -t legacy-python:2.0 ./2.0
docker run -it legacy-python:2.0
Pulling from Docker Hub or GitHub Container Registry
# from Docker Hub
docker pull j4ckofalltrades/legacy-python:2.0
docker run -it j4ckofalltrades/legacy-python:2.0
# from GitHub Container Registry
docker pull ghcr.io/j4ckofalltrades/legacy-python:2.0
docker run -it ghcr.io/j4ckofalltrades/legacy-python:2.0

Versions

Images are available on Docker Hub and GitHub Container Registry.

VersionDockerfileRelease Date
0.9.10.9.1/DockerfileFebruary 1991
1.0.11.0.1/DockerfileFebruary 1994
1.11.1/DockerfileOctober 1994
1.21.2/DockerfileApril 1995
1.31.3/DockerfileOctober 1995
1.41.4/DockerfileOctober 1996
1.51.5/DockerfileDecember 1997
1.61.6/DockerfileSeptember 2000
2.02.0/DockerfileOctober 2000
2.1.32.1.3/DockerfileApril 2002
2.22.2/DockerfileDecember 2001
2.32.3/DockerfileJuly 2003
2.42.4/DockerfileNovember 2004
2.52.5/DockerfileSeptember 2006
2.62.6/DockerfileOctober 2008
2.72.7/DockerfileJuly 2010
3.03.0/DockerfileDecember 2008
3.13.1/DockerfileJune 2009
3.23.2/DockerfileFebruary 2011
3.33.3/DockerfileSeptember 2012
3.43.4/DockerfileMarch 2014
3.53.5/DockerfileSeptember 2015
3.63.6/DockerfileDecember 2016
3.73.7/DockerfileJune 2018
3.83.8/DockerfileOctober 2019
3.93.9/DockerfileOctober 2020

Patches

Some versions require patches to compile on modern systems. All images are built on debian:bullseye using the following toolchain:

ToolVersionNotes
GCC10.2.1Via build-essential
GNU ld (binutils)2.35.2
GNU Make4.3
glibc2.31Source of the getline symbol conflict (added in glibc 2.9)
libxcrypt4.4.18crypt() split out of libc; requires explicit -lcrypt
1.0.1

Renames Python's internal getline() to mygetline() to avoid a duplicate symbol conflict with the POSIX getline() added to glibc.

1.1

Renames Python's internal getline() to mygetline() to avoid a duplicate symbol conflict with the POSIX getline() added to glibc. Also enables the -lcrypt linker flag required by the crypt module on modern Linux (where crypt() is no longer part of libc), and fixes unsafe va_list handling. On x86-64, va_list is an array type that decays to a pointer when passed by value, so va_arg calls inside vmkvalue and vgetargs1 were silently consuming the original argument list at the call site rather than a local copy. The fix uses memcpy to create a local va_list copy inside each function and changes vgetargs1 to take va_list * instead of va_list.

1.2

Renames Python's internal getline() to mygetline() to avoid a duplicate symbol conflict with the POSIX getline() added to glibc. Also enables the -lcrypt linker flag required by the crypt module on modern Linux (where crypt() is no longer part of libc).

1.3

Renames Python's internal getline() to mygetline() to avoid a duplicate symbol conflict with the POSIX getline() added to glibc. Also enables the -lcrypt linker flag required by the crypt module on modern Linux (where crypt() is no longer part of libc).

1.4

Renames Python's internal getline() to mygetline() to avoid a duplicate symbol conflict with the POSIX getline() added to glibc. Also enables the -lcrypt linker flag required by the crypt module on modern Linux (where crypt() is no longer part of libc).

1.5

Renames Python's internal getline() to mygetline() to avoid a duplicate symbol conflict with the POSIX getline() added to glibc.

3.0

Changes the shebang in Parser/asdl_c.py from /usr/bin/env python to /usr/bin/python2. This build script requires Python 2, but on modern systems python resolves to Python 3, aborting the AST C-code generation step.

3.1

Fixes the asdl_c.py shebang to use python2, removes a stray % name format argument that caused a TypeError crash during C code generation, and changes output() to accept variadic arguments to match the multiple-argument call sites.

3.2

Fixes Python 2/3 shebang issues in asdl_c.py, typeslots.py, makeopcodetargets.py, and Makefile.pre.in so build scripts use python2 explicitly. Also refactors the garbage collector's self-referential static initializer into a runtime function, fixing a crash under PIE/LTO builds on modern toolchains.

3.3

Updates obmalloc.c to use 16-byte alignment on 64-bit systems instead of the hardcoded 8-byte value. Without this, the small-object allocator can return insufficiently aligned pointers for types that require stricter alignment, causing bus errors or silent data corruption.

Attribution

Tag summary

Content type

Image

Digest

sha256:a6cd8c702

Size

335.7 MB

Last updated

about 2 months ago

docker pull j4ckofalltrades/legacy-python:3.9