Python 3.9

Posted onby admin

The “Changelog” is an HTML version of the file built from the contents of the Misc/NEWS.d directory tree, which contains all nontrivial changes to Python for the current version. Psf shall not be liable to licensee or any other users of python 3.9.4 for any incidental, special, or consequential damages or loss as a result of modifying, distributing, or otherwise using python 3.9.4, or any derivative thereof, even if advised of the possibility thereof. The “Changelog” is an HTML version of the file built from the contents of the Misc/NEWS.d directory tree, which contains all nontrivial changes to Python for the current version.

Python 3.9 is now available–but should you switch to it immediately?And if not now, when?

Thanks for watching this video and I hope you enjoyed it, please leave a like rating if you liked the video and subscribe if you like my videos, I do appreci. Python (Free) User rating. Download Latest Version. We don't have any change log information yet for version 3.9.2 of Python. Sometimes publishers take a little while to make this information available, so please check back in a few days to see if it has been updated.

The short answer is, no, you probably don’t want to switch immediately; quite possibly you can’t switch immediately.To understand why, we need to consider Python packaging, the software development process, and take a look at the history of past releases.

We can then make a guess about when Python 3.9 will actually be usable.

The problems with a new major Python release

I’m writing this article on October 6th, 2020, the day after 3.9 was released… and far too early to start using Python 3.9.Let’s see why.

1. Missing Docker images

Let’s try running Python 3.9 under Docker:

As it turns out, there is no Python 3.9 Docker image for the final release.If you want to use Python 3.9, you’re stuck with release candidates, e.g. python:3.9-rc-slim will install 3.9.0-rc2.

No doubt it will be available within a week, but early on even installing a new release can be difficult.And that’s just our first problem.

2. Missing packages

Next, let’s try installing some packages.Pandas is a pretty popular package; it was downloaded 25 million times from PyPI over the last month.When I try to install it on Python 3.9 things don’t go well:

What’s going on?

Typically, Python package maintainers upload compiled versions of their packages–known as “wheels”–to PyPI.When you install a package, you can just download the binary wheel and don’t need to compile it (unless you’re using Alpine Linux).

But it’s so soon after 3.9’s release, many packages don’t have wheels for Python 3.9 yet.For example, as of October 6th neither the PyPI file listing for NumPy (a Pandas dependency) nor the file listing for Pandas show Python 3.9 wheels.You can, of course, compile these packages from source, assuming they work out of the box with Python 3.9–but that takes a bunch more effort (setting up compilers) and time.

Some packages don’t even distribute source packages on PyPI.For example, my Fil memory profiler, or on a much more significant scale the very popular opencv-python package whose whole purpose is distributing binaries.

When Python 3.8.0 first came out, it took a month before opencv-python had a wheel available.

3. Bugs in Python

Python 3.8.0 was released in October 2019.3.8.1 was released 2 months later, with a long list of bugfixes.

Of course, there’s always another bug fix release in the future, but given an 12-month window between major releases, lots of new code will get written but not extensively used.Which means a follow-up release with plenty of bug fixes.Python 3.9.1 will likely have many bug fixes as libraries and then applications start switching and encountering more issues.

Python 3.9 pip

4. Lack of toolchain support

New versions of Python often have new syntax, and that is the case with Python 3.9: you can use arbitrary expressions in decorators.However, other tools need to support the new syntax too—autoformatters, linters, and so on.Until they do, you can’t use the new syntax.

Python 3.9.0 Download

For example, as I’m writing this the released version of the black code formatter doesn’t support 3.9 yet.

Why you should switch

Given that it takes work to upgrade—some additional testing, some tweaks to your code—it can be tempting to put off switching indefinitely.Why worry about incompatibilities, new versions, and what not, when you can just stick with your current version indefinitely?

The problem is that Python isn’t supported indefinitely, nor do libraries support all Python versions indefinitely.So if you’re running on a 5-year-old version of Python, switching becomes a Big Deal—you’ll often end up dealing with more significant cross-version changes in both Python and in libraries at the same time.Which makes upgrading scary.

Instead of one massive scary upgrade event every few years, it’s much safer to have a continuous, ongoing process of smaller upgrades.Whenever a new major Python version comes out, or a new major library version, wait a bit, and then switch.

When should you switch to Python 3.9?

At a minimum, you will need to wait until:

  1. All your libraries explicitly support the new Python release.
  2. All the tools you rely on explicitly support the new Python release.

Wait a couple months, until mid-December 2020, before even bothering to try your application.In addition to dependency availability and toolchain support, at that point you may also have access to the first point release, 3.9.1.If dependencies are still missing, keep trying again every month.

Release Date: April 28, 2020

This is an early developer preview of Python 3.9

Python 3.9 is still in development. This release, 3.9.0a6 is the last out of six planned alpha releases.Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the release process.During the alpha phase, features may be added up until the start of the beta phase (2020-05-18) and, if necessary, may be modified or deleted up until the release candidate phase (2020-08-10). Please keep in mind that this is a preview release and its use is not recommended for production environments.

Major new features of the 3.9 series, compared to 3.8

Many new features for Python 3.9 are still being planned and written. Among the new majornew features and changes so far:

Python 3.9.1 Tutorial

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

  • (Hey, fellow core developer, if a feature you find important is missing from this list, let Łukasz know.)

The next pre-release, the first beta release of Python 3.9, will be 3.9.0b1. It is currently scheduled for 2020-05-18.

More resources

  • PEP 596, 3.9 Release Schedule
  • Report bugs at https://bugs.python.org.
  • Help fund Python and its community.

And now for something completely different

Python 3.9.1

Scientist (Graham Chapman): Standard IQ tests gave the following results. The penguins scored badly when compared with primitive human sub-groups like the bushmen of the Kalahari but better than BBC program planners.
Scientist: These IQ tests were thought to contain an unfair cultural bias against the penguin. For example, it didn't take into account the penguins extremely poor educational system. To devise a fairer system of test, a team of our researchers spent eighteen months in Antarctica living like penguins, and subsequently dying like penguins - only quicker - proving that the penguin is a clever little sod in his own environment.

Python 3.9.0

VersionOperating SystemDescriptionMD5 SumFile SizeGPG
Gzipped source tarballSource release24b42e49de0fa90d77527d48cfe440ad24457620SIG
XZ compressed source tarballSource release6b5d9b7fcbc7d3a79217bb1587bae16e18202376SIG
macOS 64-bit installerMac OS Xfor OS X 10.9 and laterb8c250a9da032892be257405dd4cb70329598507SIG
Windows help fileWindows9139f19f1c54e4e0c47192ba826d4b678735047SIG
Windows x86-64 embeddable zip fileWindowsfor AMD64/EM64T/x640f3d9873584010b3bd828c221bf46bc68318514SIG
Windows x86-64 executable installerWindowsfor AMD64/EM64T/x64cb64b6a226410657bfa7d25a0cd0b31128187208SIG
Windows x86-64 web-based installerWindowsfor AMD64/EM64T/x648652b1f7522972f04ec38f3bfa9383411364120SIG
Windows x86 embeddable zip fileWindows51d266336d94d3aa2c6c2e03fa48150f7520451SIG
Windows x86 executable installerWindowsb5d7ea15620fae14cfb7e65f5156fb5b27132344SIG
Windows x86 web-based installerWindows7719192c8351a76a6569f2bc79d1216b1325808SIG