0% found this document useful (0 votes)
18 views3 pages

Summary

Uploaded by

diegohazael2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views3 pages

Summary

Uploaded by

diegohazael2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

9
was released on October 5th, 2020.

For full details, see the changelog.

Ver también PEP 596 - Python 3.9 Release Schedule

Summary – Release highlights

New syntax features:

● PEP 584, union operators adderido 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, _jason, _locale, math, operator,
resource, time, _weakref) now use multiphase 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 ZonITA 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.

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, using
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 OK OK , 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.

Aliases to Abstract Base Classes in the collections module, like


collections.Mapping alias to collections.abc.Mapping, are kept for one last
release for backward compatibility. They will be removed from Python 3.10.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy