← 返回首页
PEP 101 – Doing Python Releases 101 | peps.python.org Following system colour scheme Selected dark colour scheme Selected light colour scheme

Python Enhancement Proposals

Toggle light / dark / auto colour theme PEP 101 – Doing Python Releases 101

PEP 101 – Doing Python Releases 101

Author: Barry Warsaw <barry at python.org>, Guido van Rossum <guido at python.org> Status: Active Type: Informational Created: 22-Aug-2001 Post-History:

Replaces: 102 Table of Contents

Abstract

Making a Python release is a thrilling and crazy process. You’ve heard the expression “herding cats”? Imagine trying to also saddle those purring little creatures up, and ride them into town, with some of their buddies firmly attached to your bare back, anchored by newly sharpened claws. At least they’re cute, you remind yourself.

Actually, no, that’s a slight exaggeration 😉 The Python release process has steadily improved over the years and now, with the help of our amazing community, is really not too difficult. This PEP attempts to collect, in one place, all the steps needed to make a Python release. Most of the steps are now automated or guided by automation, so manually following this list is no longer necessary.

Things You’ll Need

As a release manager there are a lot of resources you’ll need to access. Here’s a hopefully-complete list.

Types of Releases

There are several types of releases you will need to make. These include:

Some of these release types actually involve more than one release branch. In particular, a new branch is that point in the release cycle when a new feature release cycle begins. Under the current organization of the CPython Git repository, the main branch is always the target for new features. At some point in the release cycle of the next feature release, a new branch release is made which creates a new separate branch for stabilization and later maintenance of the current in-progress feature release (3.n.0) and the main branch is modified to build a new version (which will eventually be released as 3.n+1.0). While the new branch release step could occur at one of several points in the release cycle, current practice is for it to occur at feature code cutoff for the release which is scheduled for the first beta release.

In the descriptions that follow, steps specific to release types are labeled accordingly, for now, new branch and final.

How To Make A Release

Here are the steps taken to make a Python release. Some steps are more fuzzy than others because there’s little that can be automated (e.g. writing the NEWS entries). Where a step is usually performed by An Expert, the role of that expert is given. Otherwise, assume the step is done by the Release Manager (RM), the designated person performing the release. The roles and their current experts are:

Note

It is highly recommended that the RM contact the Experts the day before the release. Because the world is round and everyone lives in different timezones, the RM must ensure that the release tag is created in enough time for the Experts to cut binary releases.

You should not make the release public (by updating the website and sending announcements) before all experts have updated their bits. In rare cases where the expert for Windows or Mac is MIA, you may add a message “(Platform) binaries will be provided shortly” and proceed.

We use the following conventions in the examples below. Where a release number is given, it is of the form 3.X.YaN, e.g. 3.13.0a3 for Python 3.13.0 alpha 3, where “a” == alpha, “b” == beta, “rc” == release candidate.

Release tags are named v3.X.YaN. The branch name for minor release maintenance branches is 3.X.

As much as possible, the release is automated and guided by the run_release.py script, which is available in a separate repository: python/release-tools. This helps by automating many of the following steps, and guides you to perform some manual steps.

Warning

STOP: at this point you must receive the “green light” from other experts in order to create the release. There are things you can do while you wait though, so keep reading until you hit the next STOP.

Warning

STOP and confirm:

If green, it’s time to merge the release engineering branch back into the main repo.

Now it’s time to twiddle the website. Almost none of this is automated, sorry.

To do these steps, you must have the permission to edit the website. If you don’t have that, ask someone on pydotorg@python.org for the proper permissions.

What Next?

You’ve just made a Python release!

Moving to End-of-life

Under current policy, a release branch normally reaches end-of-life status five years after its initial release. The policy is discussed in more detail in the Python Developer’s Guide. When end-of-life is reached, there are a number of tasks that need to be performed either directly by you as release manager or by ensuring someone else does them. Some of those tasks include:

Windows Notes

Windows has a MSI installer, various flavors of Windows have “special limitations”, and the Windows installer also packs precompiled “foreign” binaries (Tcl/Tk, expat, etc).

The installer is tested as part of the Azure Pipeline. In the past, those steps were performed manually. We’re keeping this for posterity.

Concurrent with uploading the installer, the WE installs Python from it twice: once into the default directory suggested by the installer, and later into a directory with embedded spaces in its name. For each installation, the WE runs the full regression suite from a DOS box, and both with and without -0. For maintenance release, the WE also tests whether upgrade installations succeed.

The WE also tries every shortcut created under Start -> Menu -> the Python group. When trying IDLE this way, you need to verify that Help -> Python Documentation works. When trying pydoc this way (the “Module Docs” Start menu entry), make sure the “Start Browser” button works, and make sure you can search for a random module (like “random” <wink>) and then that the “go to selected” button works.

It’s amazing how much can go wrong here – and even more amazing how often last-second checkins break one of these things. If you’re “the Windows geek”, keep in mind that you’re likely the only person routinely testing on Windows, and that Windows is simply a mess.

Repeat the testing for each target architecture. Try both an Admin and a plain User (not Power User) account.

Copyright

This document has been placed in the public domain.

Contents


Page Source (GitHub)

Source: https://github.com/python/peps/blob/main/peps/pep-0101.rst

Last modified: 2026-05-27 15:23:08 UTC