See also: 

PEP 596 - Python 3.9 Release Schedule 

## 1 Summary – Release highlights 

New syntax features: 

• PEP 584 , union operators added to dict ; 

• PEP 585 , type hinting generics in standard collections; 

• PEP 614 , relaxed grammar restrictions on decorators. 

New built-in features: 

• PEP 616 , string methods to remove prefixes and suffixes. 

New features in the standard library: 

• PEP 593 , flexible function and variable annotations; 

• os.pidfd_open() added that allows process management without races and signals. 

Interpreter improvements: 

• PEP 573 , fast access to module state from methods of C extension types; 

• PEP 617 , CPython now uses a new parser based on PEG; 

• a number of Python builtins (range, tuple, set, frozenset, list, dict) are now sped up using PEP 590 vectorcall; 

• garbage collection does not block on resurrected objects; 

• a number of Python modules ($_{_abc}$ , $_{audioop}$, _bz2 , _codecs , _contextvars , _crypt , _functools , _json , _locale , $_{math}$, $_{operator}$, $_{resource}$, $_{time}$, _weakref ) now use mul- tiphase initialization as defined by PEP 489; 

• a number of standard library modules ($_{audioop}$,$_{ast}$,$_{grp}$,$_{_hashlib}$,$_{pwd}$,$_{_posixsubprocess}$ , $_{random}$,$_{select}$ ,$_{struct}$ ,$_{termios}$,$_{zlib}$) are now using the stable ABI defined by PEP 384. 

New library modules: 

• PEP 615 , the IANA Time Zone Database is now present in the standard library in the$_{zoneinfo}$ module; 

• an implementation of a topological sort of a graph is now provided in the new$_{graphlib}$module. 

Release process changes: 

• PEP 602 , CPython adopts an annual release cycle. 

## 2 You should check for DeprecationWarning in your code 

When Python 2.7 was still supported, a lot of functionality in Python 3 was kept for backward compatibility with Python 2.7. With the end of Python 2 support, these backward compatibility layers have been removed, or will be removed soon. Most of them emitted a $_{DeprecationWarning}$warning for several years. For example, us- ing$_{collections.Mapping}$ instead of$_{collections.abc.Mapping}$ emits a$_{DeprecationWarning}$ since Python 3.3, released in 2012. 

Test your application with the -W default command-line option to see $_{DeprecationWarning}$and PendingDeprecationWarning , or even with $_{-W error}$to treat them as errors. Warnings Filter can be used to ignore warnings from third-party code. 

Python 3.9 is the last version providing those Python 2 backward compatibility layers, to give more time to Python projects maintainers to organize the removal of the Python 2 support and add support for Python 3.9. 

