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.5

Release Date: May 3, 2021

This is the fifth maintenance release of Python 3.9

Note: The release you're looking at is Python 3.9.5, a bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here.

There's been 111 commits since 3.9.4 which is a similar amount compared to 3.8 at the same stage of the release cycle. See the changelog for details.

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

And Now for Something Completely Different

Mr. Praline (John Cleese): I wish to complain, British-Railways Person.
Attendant (Terry Jones): I DON'T HAVE TO DO THIS JOB, YOU KNOW!!!
Mr. Praline: I beg your pardon...?
Attendant: I'm a qualified brain surgeon! I only do this job because I like being my own boss!
Mr. Praline: Excuse me, this is irrelevant, isn't it?
Attendant: Yeah, well it's not easy to pad these python files out to 150 lines, you know.
Mr. Praline: Well, I wish to complain. I got on the Bolton train and found myself deposited here in Ipswitch.
Attendant: No, this is Bolton.
Mr. Praline: (to the camera) The pet shop man's brother was LYING!
Attendant: Can't blame British Rail for that.

Full Changelog

Files

Version Operating System Description MD5 Sum File Size GPG
Gzipped source tarball Source release 364158b3113cf8ac8db7868ce40ebc7b 24.4 MB SIG
XZ compressed source tarball Source release 71f7ada6bec9cdbf4538adc326120cfd 18.2 MB SIG
macOS 64-bit Intel installer macOS for macOS 10.9 and later 870e851eef2c6712239e0b97ea5bf407 28.5 MB SIG
macOS 64-bit universal2 installer macOS for macOS 10.9 and later, including macOS 11 Big Sur on Apple Silicon 59aedbc04df8ee0547d3042270e9aa57 36.0 MB SIG
Windows installer (64-bit) Windows Recommended 53a354a15baed952ea9519a7f4d87c3f 27.1 MB SIG
Windows installer (32-bit) Windows b29b19a94bbe498808e5e12c51625dd8 26.0 MB SIG
Windows help file Windows b311674bd26a602011d8baea2381df9e 8.5 MB SIG
Windows embeddable package (64-bit) Windows 0b3a4a9ae9d319885eade3ac5aca7d17 8.0 MB SIG
Windows embeddable package (32-bit) Windows cacf28418ae39704743fa790d404e6bb 7.2 MB SIG