2 min Devops

Python 3.9 released with multi-processing and other improvements

Python 3.9 released with multi-processing and other improvements

Python 3.9.0 contains many new features and optimizations.

The new version of Python is now available. Volunteers have been working on the new release for over a year. And although beta versions have been available for some time, the first official version of Python 3.9 was released on October 5, 2020.

Python 3.9 includes a new PEG-based parser to CPython as a replacement to the previous LL-based parser. It also offers multi-processing improvements, along with fast access to module state from methods of C extension types.

New parser offers increased clarity

Python’s new PEG-based parser uses a grammar which more closely reflects the actual way in which the parser will operate. The parser only knows one valid parse-tree per string. The new parser uses more memory, however this drawback is offset by the reduction of maintenance costs and added flexibility for new features.

For the time being, developers who don’t want to use the new parser can still utilise the old one by using -X oldparser on the command line. Developers should get used to the new parser soon, however, as the old one will be deleted in Python 3.10.

There are also several other interpreter improvements. On the syntax side, Python 3.9.0 provides union operators for dict, type hinting generics in standard collections.

The new release boasts relaxed grammar restrictions on decorators, and there is support with string methods to remove prefixes and suffices. Python 3.9 also includes IANA time zone database support in the standard library with zoneinfo and several other improvements.

Python’s what’s new documentation details the new improvements in 3.9.0.

Python gains in popularity

Python appears to be getting more popular according to recognised industry rankings. In the October edition of the TIOBE Index, Python appears to be moving closer to second position.

“Python conquered the third position in the TIOBE index last year, but its popularity is still rising,” said Paul Jansen, CEO TIOBE Software, in announcing the October 2020 rankings. “This month it has reached a new all time high at 11.28 percent. Since Java is approaching its all time low since 2001, Python and Java are getting pretty close.”

The Python team has also announced a new fixed release schedule. New releases will be made available every October. Python 3.10 is planned to be released in October 2021.