2 min read

Three days ago, the team behind Python announced the release of Python 3.9.0a1, which is the first out of the six planned alpha releases of Python 3.9. The final stable version of Python 3.9 is slated to release in May 2020. An alpha release indicates that developers can start testing the new features and check for bug fixes but are not recommended to use it in production.

Last month, the previous stable version, Python 3.8 was released with features like walrus operator, positional-only parameters support for Vectorcall.

Read More: Core Python team confirms sunsetting Python 2 on January 1, 2020

Let’s look at some of the raw features that you can be expected in the upcoming Python 3.9 version.

Some improvements introduced in Python 3.9.0a1

Language Changes

  • The __import__() function which is invoked by the import statement will now raise ImportError instead of ValueError. In the previous versions, the latter used to occur when a relative import went past its top-level package.
  • Starting from Python 3.9.0a1, the absolute path of the script filename will be specified on the command line: the __file__ attribute of the __main__ module. The sys.argv[0] and sys.path[0] will become an absolute path rather than a relative path. Also, the traceback will now display the absolute path for __main__ module frames in this case.
  • The encoding and errors arguments in the debug build and development mode will now be checked in the string encoding and decoding operations.

Improved Modules

  • ast: It is added in the indent option to dump() and produces a multi-line indented output.
  • asyncio: It can now use coroutine which is a generalized form of subroutines. Subroutines enter and exit at only two different points, while coroutines can be entered, exited, and resumed at many points. Moreover, asyncio.run() is updated to use the new coroutine.
  • New functions like curses.get_escdelay(), curses.set_escdelay(), curses.get_tabsize(), and curses.set_tabsize() and constants F_OFD_GETLK, F_OFD_SETLK and F_OFD_SETLKW is included in Python 3.9.0a1.

Few Python users have already started testing the Python 3.9.0a1 release.

The next alpha release for Python 3.9 is scheduled for 16th December 2019.

To know more about Python 3.9.0a1, check out the official documentation.

Read Next

Introducing Spleeter, a Tensorflow based python library that extracts voice and sound from any music track

Severity issues raised for Python 2 Debian packages for not supporting Python 3

Introducing OpenDrop, an open-source implementation of Apple AirDrop written in Python

Poetry, a Python dependency management and packaging tool, releases v1 beta 1 with URL dependency

PyPy will continue to support Python 2.7, even as major Python projects migrate to Python 3

A born storyteller turned writer!