The all-python is a helper script to build python interpreter and run some code on various python versions. Supports historical CPython versions since v2.0.1.
Download the pre-built docker image from docker hub.
$ docker pull yuuki0xff/all-python
If you want to build the docker image yourself, please run the following command. It takes few hours and 30GB+ free space on local storage to build.
$ make
Show help:
$ docker run --rm -it yuuki0xff/all-python --help
Run a small script on all python versions:
$ docker run --rm -it yuuki0xff/all-python -- -c 'print(type(u""))'
=====> 2.0.1 ~ 2.7.16 <=====
<type 'unicode'>
=====> 3.0 ~ 3.2.6 <=====
File "<string>", line 1
print(type(u""))
^
SyntaxError: invalid syntax
Command returned non-zero exit status 1
Command: ['python', '-c', 'print(type(u""))']
=====> 3.3.0 ~ 3.7.3 <=====
<class 'str'>
Run a small script on python 2.7.x:
$ docker run --rm -it yuuki0xff/all-python -v 2.7.x -- -c 'print(type(u""))'
=====> 2.7.1 ~ 2.7.16 <=====
<type 'unicode'>
Run the unit test of flask framework on all python versions:
$ docker run --rm -it yuuki0xff/all-python \
--before 'git clone --depth=1 https://github.com/pallets/flask &>/dev/null' \
--exec 'cd flask && make test'
Enter interactive shell:
$ docker run --rm -it yuuki0xff/all-python bash
- akr/all-ruby - Run various versions of ruby command.