Although the size of the to-do list in this PEP is much less scary than that in PEP 101, it turns out not to be enough justification for the duplication of information, and with it, the danger of one of the copies to become out of date. Therefore, this PEP is not maintained anymore, and micro releases are fully covered by PEP 101.
Making a Python release is an arduous process that takes a minimum of half a day’s work even for an experienced releaser. Until recently, most – if not all – of that burden was borne by Guido himself. But several recent releases have been performed by other folks, so this PEP attempts to collect, in one place, all the steps needed to make a Python bugfix release.
The major Python release process is covered in PEP 101 - this PEP is just PEP 101, trimmed down to only include the bits that are relevant for micro releases, a.k.a. patch, or bug fix releases.
It is organized as a recipe and you can actually print this out and check items off as you complete them.
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 name of that expert is given. Otherwise, assume the step is done by the Release Manager (RM), the designated person performing the release. Almost every place the RM is mentioned below, this step can also be done by the BDFL of course!
XXX: We should include a dependency graph to illustrate the steps that can be taken in parallel, or those that depend on other steps.
We use the following conventions in the examples below. Where a release number is given, it is of the form X.Y.MaA, e.g. 2.1.2c1 for Python 2.1.2 release candidate 1, where “a” == alpha, “b” == beta, “c” == release candidate. Final releases are tagged with “releaseXYZ” in CVS. The micro releases are made from the maintenance branch of the major release, e.g. Python 2.1.2 is made from the release21-maint branch.
You also probably want to reset the %define release line to ‘1pydotorg’ if it’s not already that.
The LICENSE file contains a table that describes the legal heritage of Python; you should add an entry for the X.Y.Z release you are now making. You should update this table in the LICENSE file on the CVS trunk too.
PCbuild/BUILDno.txt contains the Windows build number, see the instructions in this file how to change it. Saving the project file PCbuild/pythoncore.dsp results in a change to PCbuild/pythoncore.dsp as well.
PCbuild/python20.wse sets up the Windows installer version resource (displayed when you right-click on the installer .exe and select Properties), and also contains the Python version number.
(Before version 2.3.2, it was required to manually edit PC/python_nt.rc, this step is now automated by the build process.)
Add high level items new to this release. E.g. if we’re releasing 2.2a3, there must be a section at the top of the file explaining “What’s new in Python 2.2a3”. It will be followed by a section entitled “What’s new in Python 2.2a2”.
Note that you /hope/ that as developers add new features to the trunk, they’ve updated the NEWS file accordingly. You can’t be positive, so double check. If you’re a Unix weenie, it helps to verify with Thomas about changes on Windows, and Jack Jansen about changes on the Mac.
This command should help you (but substitute the correct -r tag!):
IOW, you’re printing out all the cvs log entries from the previous release until now. You can then troll through the news.txt file looking for interesting things to add to NEWS.
Note that Fred is responsible both for merging doc changes from the trunk to the branch AND for merging any branch changes from the branch to the trunk during the cleaning up phase. Basically, if it’s in Doc/ Fred will take care of it.
The installer includes the MSVC 6.0 runtime in the files MSVCRT.DLL and MSVCIRT.DLL. It leads to disaster if these files are taken from the system directory of the machine where the installer is built, instead it must be absolutely made sure that these files come from the VCREDIST.EXE redistributable package contained in the MSVC SP5 CD. VCREDIST.EXE must be unpacked with winzip, and the Wise Installation System prompts for the directory.
After building the installer, it should be opened with winzip, and the MS dlls extracted again and check for the same version number as those unpacked from VCREDIST.EXE.
Thomas uploads this file to the starship. He then sends the RM a notice which includes the location and MD5 checksum of the Windows executable.
Note that Thomas’s creation of the Windows executable may generate a few more commits on the branch. Thomas will be responsible for merging Windows-specific changes from trunk to branch, and from branch to trunk.
Now, you’re ready to build the source tarball. First cd to your working directory for the branch. E.g. % cd …/python-22a3
You should not see any “M” files, but you may see several “P” and/or “U” files. I.e. you better not have any uncommitted changes in your working directory, but you may pick up some of Fred’s or Thomas’s last minute changes.
Be sure to tag only the python/dist/src subdirectory of the Python CVS tree!
Note that if you don’t have the md5sum program, there is a Python replacement in the Tools/scripts/md5sum.py file.
If the tests pass, then you can feel good that the tarball is fine. If some of the tests fail, or anything else about the freshly unpacked directory looks weird, you better stop now and figure out what the problem is.
So, there’s a directory called “2.2” which contains Python-2.2a2.exe and Python-2.2a2.tgz, along with a “prev” subdirectory containing Python-2.2a1.exe and Python-2.2a1.tgz.
So…
Once the announcement is ready, send it to the following addresses:
Feel free to remove any old news items.
Now it’s time to do some cleanup. These steps are very important!
Make sure that the other PY_ version macros contain the correct values. Commit this change.
To ensure that the regression test suite passes. If not, you screwed up somewhere!
Step 5 …
Verify! This can be interleaved with Step 4. Pretend you’re a user: download the files from python.org, and make Python from it. This step is too easy to overlook, and on several occasions we’ve had useless release files. Once a general server problem caused mysterious corruption of all files; once the source tarball got built incorrectly; more than once the file upload process on SF truncated files; and so on.
Rejoice. Drink. Be Merry. Write a PEP like this one. Or be like unto Guido and take A Vacation.
You’ve just made a Python release!
Actually, there is one more step. You should turn over ownership of the branch to Jack Jansen. All this means is that now he will be responsible for making commits to the branch. He’s going to use this to build the MacOS versions. He may send you information about the Mac release that should be merged into the informational pages on www.python.org. When he’s done, he’ll tag the branch something like “rX.YaZ-mac”. He’ll also be responsible for merging any Mac-related changes back into the trunk.
The Final release of any major release, e.g. Python 2.2 final, has special requirements, specifically because it will be one of the longest lived releases (i.e. betas don’t last more than a couple of weeks, but final releases can last for years!).
For this reason we want to have a higher coordination between the three major releases: Windows, Mac, and source. The Windows and source releases benefit from the close proximity of the respective release-bots. But the Mac-bot, Jack Jansen, is 6 hours away. So we add this extra step to the release process for a final release:
The python.org site also needs some tweaking when a new bugfix release is issued.
Windows has a GUI installer, various flavors of Windows have “special limitations”, and the Windows installer also packs precompiled “foreign” binaries (Tcl/Tk, expat, etc). So Windows testing is tiresome but very necessary.
Concurrent with uploading the installer, Thomas 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, he runs the full regression suite from a DOS box, and both with and without -0.
He 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 (Thomas uses “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 all of the above on at least one flavor of Win9x, and one of NT/2000/XP. On NT/2000/XP, try both an Admin and a plain User (not Power User) account.
WRT Step 5 above (verify the release media), since by the time release files are ready to download Thomas has generally run many Windows tests on the installer he uploaded, he usually doesn’t do anything for Step 5 except a full byte-comparison (“fc /b” if using a Windows shell) of the downloaded file against the file he uploaded.
This document has been placed in the public domain.
Source: https://github.com/python/peps/blob/main/peps/pep-0102.rst
Last modified: 2025-02-01 08:55:40 UTC