Skip to content

Latest commit

 

History

History
145 lines (91 loc) · 4.12 KB

File metadata and controls

145 lines (91 loc) · 4.12 KB

What's New In Python 3.9

Release:|release|
Date: |today|

This article explains the new features in Python 3.9, compared to 3.8.

For full details, see the :source:`Misc/NEWS` file.

Note

Prerelease users should be aware that this document is currently in draft form. It will be updated substantially as Python 3.9 moves towards release, so it's worth checking back even after reading earlier versions.

Summary -- Release highlights

New Features

Other Language Changes

New Modules

  • None yet.

Improved Modules

threading

In a subinterpreter, spawning a daemon thread now raises an exception. Daemon threads were never supported in subinterpreters. Previously, the subinterpreter finalization crashed with a Pyton fatal error if a daemon thread was still running.

Optimizations

Build and C API Changes

  • Add a new public :c:func:`PyObject_CallNoArgs` function to the C API: call a callable Python object without any arguments. It is the most efficient way to call a callable Python object without any argument. (Contributed by Victor Stinner in :issue:`37194`.)

Deprecated

Removed

  • The C function PyImport_Cleanup() has been removed. It was documented as: "Empty the module table. For internal use only." (Contributed by Victor Stinner in :issue:`36710`.)
  • _dummy_thread and dummy_threading modules have been removed. These modules were deprecated since Python 3.7 which requires threading support. (Contributed by Victor Stinner in :issue:`37312`.)
  • aifc.openfp() alias to aifc.open(), sunau.openfp() alias to sunau.open(), and wave.openfp() alias to wave.open() have been removed. They were deprecated since Python 3.7. (Contributed by Victor Stinner in :issue:`37320`.)

Porting to Python 3.9

This section lists previously described changes and other bugfixes that may require changes to your code.