Notice: This page displays a fallback because interactive scripts did not run. Possible causes include disabled JavaScript or failure to load scripts or stylesheets.

Python 3.9.13

Warning: Python 3.9.13 reached end-of-life on 2025-10-31. It is no longer supported and does not receive security updates. We recommend upgrading to the latest Python release.
Note: Python 3.9.13 has been superseded by Python 3.9.25.

Release date: May 17, 2022

This is the thirteenth and final regular maintenance release of Python 3.9

Note: The release you're looking at is Python 3.9.13, 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.

According to the release calendar specified in PEP 596, Python 3.9.13 is the final regular maintenance release. Starting now, the 3.9 branch will only accept security fixes and releases of those will be made in source-only form until October 2025.

Compared to the 3.8 series, this last regular bugfix release is still pretty active at 166 commits since 3.9.12. In comparison, version 3.8.10, the final regular bugfix release of Python 3.8, included only 92 commits. However, it's likely that it was 3.8 that was special here with the governance changes occupying core developers' minds. For reference, version 3.7.8, the final regular bugfix release of Python 3.7, included 187 commits.

In any case, 166 commits is quite a few changes, some of which being pretty important fixes. Take a look at the change log 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): 'ELLO POLLY!!! Testing! Testing! This is your nine o'clock alarm call! (Takes parrot out of the cage , throws it up in the air and watches it plummet to the floor.)
Mr. Praline: Now that's what I call a dead parrot.
Owner (Michael Palin): No, no.....No, he's stunned!
Mr. Praline: STUNNED?!
Owner: Yeah! You stunned him, just as he was wakin' up! Norwegian Blues stun easily, major.
Mr. Praline: Um... now look, mate. I've definitely 'ad enough of this. That parrot is definitely deceased, and when I purchased it not 'alf an hour ago, you assured me that its total lack of movement was due to it bein' tired and shagged out following a prolonged squawk.
Owner: Well, he's... he's, ah... probably pining for the fjords.

Full Changelog

Files

Version Operating system Description File size GPG MD5 checksum
Gzipped source tarball Source release 25.1 MB SIG eafda83543bad127cadef4d288fdab87
XZ compressed source tarball Source release 18.8 MB SIG 5e2411217b0060828d5f923eb422a3b8
macOS 64-bit Intel-only installer macOS for macOS 10.9 and later, deprecated 29.6 MB SIG 671848930809decf27f586ddf98c6e9b
macOS 64-bit universal2 installer macOS for macOS 10.9 and later 37.0 MB SIG 76b63cf623e32cdf27c5033434bd69ce
Windows installer (64-bit) Windows Recommended 27.9 MB SIG e7062b85c3624af82079794729618eca
Windows installer (32-bit) Windows 26.8 MB SIG 46c35b0a2a4325c275b2ed3187b08ac4
Windows help file Windows 8.5 MB SIG c86feba059b340a1de2a9d2ee7059a6d
Windows embeddable package (64-bit) Windows 8.2 MB SIG 57731cf80b1c429a0be7133266d7d7cf
Windows embeddable package (32-bit) Windows 7.4 MB SIG fec0bc06857502a56dd1aeaea6488ef8