Programming: The Python language gets three “cursed” updates


The Python Software Foundation (PSF), which brings together developers of the core Python programming language, has released three new versions of the popular programming language, after a bumpy start to the year. The goal? Make version 3.11 twice as fast as its predecessor, as Python creator Guido van Rossum wishes.

The new versions of the Python 3.10, 3.9 and preview 3.11 series were launched on Monday despite a series of setbacks and the slow renewal of a “more complex than expected” code signing certificate. Version 3.10.x is the latest feature set of Python 3, while 3.9.x is the legacy set, and Python 3.11.x represents the future of the language.

“The versions you’re watching have all been cursed in some way. What a way to start 2022! In addition to the certificate delay, Python 3.10.2 is an accelerated release, Python 3.11.0a4 had nearly 20 version hangs before it was finally cleared, and Python 3.9.10 was made from a new Mac M1 on macOS Monterey,” explains the PSF team.

A chaotic certificate renewal

None of the new versions of Python — 3.10.2, 3.9.1, and 3.11.0a4 — contain a Windows installer due to a certificate renewal issue. Despite this obvious shortcoming, the Core Python (CPython) development team decided to release the new versions due to a serious memory leak issue affecting versions 3.10 and earlier, which makes installing version 3.10 .2 “strongly recommended”.

“We held back on versions all week while the situation was being resolved. The urgency of 3.10.2 in particular, however, pushed us to release without the Windows installers”, says Lukasz Langa, CPython developer and release manager… while “apologizing for the inconvenience” and promising to “do whatever is in [son] power to set up the Windows installer as soon as possible”.

CPython is the Python reference implementation on which other Python variants are based. “The first three versions of 2022 have been cursed! What is usually a fairly mundane and largely automated process turned out to be three separate sites,” adds the developer.

Problem solved this week?

The PSF, however, expects the certificate renewal and Windows installer issue to be fixed this week.

The memory leak that affects Python 3.10 occurs on some function calls when developers use Cython, a superset of Python with a compiler that makes it easy to write extensions in C code that interact with Python code. Cython enables faster, C-like performance at running Python code.

“The memory leak consisted of a constant small amount of bytes in some function calls in the Cython code,” says Langa. “Although in most cases this was not very noticeable, it had a big impact for long-term applications and certain usage patterns. »

Some serious flaws

CPython developer Pablo Galindo Salgado notes that the memory leak affects the language quite drastically, with one bug report implying that “every function call using __Pyx_PyCFunction_FastCall leaks memory in 3.10, which is pretty bad.” Bug reports indicated that there was a leak of megabytes of memory, which justified the urgent fixing of this bug.

The CPython developers have determined that the leak is in PyEval_EvalFrameEx, which is used by Cython rather than Python, but is only present in Python 3.10 and earlier, but not in Python 3.11 and later.

The next maintenance release of Python 3.10 will be 3.10.3 and is scheduled for April 4, 2022.

Source: ZDNet.com





Source link -97