this is a german Web-Mirror of PYTHON.ORG powered by Domainunion AG

Notice: While Javascript is not essential for this website, your interaction with the content will be limited. Please turn Javascript on for the full experience.

Python 3.9.4

Release Date: April 4, 2021

This is the fourth maintenance release of Python 3.9

Python 3.9.4 is a hotfix release addressing an unintentional ABI incompatibility introduced in Python 3.9.3. Upgrading is highly recommended to all users. Details in bpo-43710.

To reiterate, Python 3.9.3 was itself an expedited release due to its security content:

  • bpo-43631: high-severity CVE-2021-3449 and CVE-2021-3450 were published for OpenSSL, it's been upgraded to 1.1.1k in CI, and macOS and Windows installers.
  • bpo-42988: CVE-2021-3426: Remove the getfile feature of the pydoc module which could be abused to read arbitrary files on the disk (directory traversal vulnerability). Moreover, even source code of Python modules can contain sensitive data like passwords. Vulnerability reported by David Schw√∂rer.
  • bpo-43285: ftplib no longer trusts the IP address value returned from the server in response to the PASV command by default. This prevents a malicious FTP server from using the response to probe IPv4 address and port combinations on the client network. Code that requires the former vulnerable behavior may set a trust_server_pasv_ipv4_address attribute on their ftplib.FTP instances to True to re-enable it.
  • bpo-43439: Add audit hooks for gc.get_objects(), gc.get_referrers() and gc.get_referents(). Patch by Pablo Galindo.

Major new features of the 3.9 series, compared to 3.8

Some of the new major new features and changes in Python 3.9 are:

  • PEP 573, Module State Access from C Extension Methods
  • PEP 584, Union Operators in dict
  • PEP 585, Type Hinting Generics In Standard Collections
  • PEP 593, Flexible function and variable annotations
  • PEP 602, Python adopts a stable annual release cadence
  • PEP 614, Relaxing Grammar Restrictions On Decorators
  • PEP 615, Support for the IANA Time Zone Database in the Standard Library
  • PEP 616, String methods to remove prefixes and suffixes
  • PEP 617, New PEG parser for CPython
  • BPO 38379, garbage collection does not block on resurrected objects;
  • BPO 38692, os.pidfd_open added that allows process management without races and signals;
  • BPO 39926, Unicode support updated to version 13.0.0;
  • BPO 1635741, when Python is initialized multiple times in the same process, it does not leak memory anymore;
  • A number of Python builtins (range, tuple, set, frozenset, list, dict) are now sped up using PEP 590 vectorcall;
  • A number of Python modules (_abc, audioop, _bz2, _codecs, _contextvars, _crypt, _functools, _json, _locale, 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.

You can find a more comprehensive list in this release's "What's New" document.

More resources

Full Changelog

Files

Version Operating System Description MD5 Sum File Size GPG
Gzipped source tarball Source release cc8507b3799ed4d8baa7534cd8d5b35f 25411523 SIG
XZ compressed source tarball Source release 2a3dba5fc75b695c45cf1806156e1a97 18900304 SIG
macOS 64-bit Intel installer Mac OS X for macOS 10.9 and later 2b974bfd787f941fb8f80b5b8084e569 29866341 SIG
macOS 64-bit universal2 installer Mac OS X for macOS 10.9 and later, including macOS 11 Big Sur on Apple Silicon (experimental) 9aa68872b9582c6c71151d5dd4f5ebca 37648771 SIG
Windows embeddable package (32-bit) Windows b4bd8ec0891891158000c6844222014d 7580762 SIG
Windows embeddable package (64-bit) Windows 5c34eb7e79cfe8a92bf56b5168a459f4 8419530 SIG
Windows help file Windows aaacfe224768b5e4aa7583c12af68fb0 8859759 SIG
Windows installer (32-bit) Windows b790fdaff648f757bf0f233e4d05c053 27222976 SIG
Windows installer (64-bit) Windows Recommended ebc65aaa142b1d6de450ce241c50e61c 28323440 SIG