PyPy 7.3.0 Is Released Just-In-Time For Christmas

From LinuxReviews
Jump to navigationJump to search
Python.jpg

The latest version of the just-in-time python interpreter PyPy fixes "several issues and bugs raised by the growing community". The binary downloads offered by the project are now built using the standard manylinux2010 docker image which means that they can be used with just about any GNU/Linux distribution.

written by 林慧 (Wai Lin) 2019-12-24 - last edited 2019-12-26. © CC BY

Python.jpg

manylinux is a project which provides a CentOS 6 docker image with the tools required to make binary python extensions which will run on any Linux distribution. PyPy 7.3.0 is built so the binaries offered at pypy.org/download.html will run on all Debian and Red Hat based distributions. That includes Ubuntu, Linux Mint, CentOS, Fedora and many more. Fedora has its own pypy packages in its repositories, they are called pypy for Python 2.x and pypy3 for Python 3.x.

PyPy 7.3.0 is a double release which includes PyPy2.7, with support for the standard features in the discontinued Python 2.7, and PyPy3.6 which, as the name implies, can be a drop-in replacement for Python 3.6. The advantage of using PyPy over the typically default standard Python interpreter is one of speed: PyPy executes python code faster, much faster in some cases.

pypy will do what regular python does in most cases. This code:

File: fib.py
def fib(n):
    a, b = 0, 1
    while a < n:
        print(a, end=' ')
        a, b = b, a+b
    print()
fib(1000)

will output the Fibonacci sequence up to 1000 (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987) when it's executed with python3 fib.py and pypy3 fib.py. Pypy's performance advantage is irrelevant in this particular case. If you are using Python for something where speed is relevant then PyPy's new release is for you.

PyPy's homepage is at pypy.org and the download page is at pypy.org/download.html. The release announcement is at blogspot.com.

0.00
(0 votes)


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.