Although the size of the to-do list in this PEP is much less scarythan that inPEP 101, it turns out not to be enough justificationfor the duplication of information, and with it, the danger of oneof the copies to become out of date. Therefore, this PEP is notmaintained anymore, and micro releases are fully covered byPEP 101.
Making a Python release is an arduous process that takes aminimum of half a day’s work even for an experienced releaser.Until recently, most – if not all – of that burden was borne byGuido himself. But several recent releases have been performed byother folks, so this PEP attempts to collect, in one place, allthe steps needed to make a Python bugfix release.
The major Python release process is covered inPEP 101 - this PEPis justPEP 101, trimmed down to only include the bits that arerelevant for micro releases, a.k.a. patch, or bug fix releases.
It is organized as a recipe and you can actually print this out andcheck items off as you complete them.
Here are the steps taken to make a Python release. Some steps aremore fuzzy than others because there’s little that can beautomated (e.g. writing the NEWS entries). Where a step isusually 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 placethe RM is mentioned below, this step can also be done by the BDFLof course!
XXX: We should include a dependency graph to illustrate the stepsthat can be taken in parallel, or those that depend on othersteps.
We use the following conventions in the examples below. Where arelease number is given, it is of the form X.Y.MaA, e.g. 2.1.2c1for 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 themaintenance branch of the major release, e.g. Python 2.1.2 is madefrom the release21-maint branch.
PY_VERSION was changed to above. E.g:%defineversion2.3.1
You also probably want to reset the %define release lineto ‘1pydotorg’ if it’s not already that.
The LICENSE file contains a table that describes the legalheritage of Python; you should add an entry for the X.Y.Zrelease you are now making. You should update this table in theLICENSE file on the CVS trunk too.
PCbuild/BUILDno.txt contains the Windows build number, see theinstructions in this file how to change it. Saving the projectfile PCbuild/pythoncore.dsp results in a change toPCbuild/pythoncore.dsp as well.
PCbuild/python20.wse sets up the Windows installer versionresource (displayed when you right-click on the installer .exeand select Properties), and also contains the Python versionnumber.
(Before version 2.3.2, it was required to manually editPC/python_nt.rc, this step is now automated by the buildprocess.)
Add high level items new to this release. E.g. if we’rereleasing 2.2a3, there must be a section at the top of the fileexplaining “What’s new in Python 2.2a3”. It will be followed bya section entitled “What’s new in Python 2.2a2”.
Note that you /hope/ that as developers add new features to thetrunk, they’ve updated the NEWS file accordingly. You can’t bepositive, so double check. If you’re a Unix weenie, it helps toverify with Thomas about changes on Windows, and Jack Jansenabout changes on the Mac.
This command should help you (but substitute the correct -r tag!):
%cvslog-rr22a1:|pythonTools/scripts/logmerge.py>/tmp/news.txt
IOW, you’re printing out all the cvs log entries from theprevious release until now. You can then troll through thenews.txt file looking for interesting things to add to NEWS.
Note that Fred is responsible both for merging doc changes fromthe trunk to the branch AND for merging any branch changes fromthe 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 filesMSVCRT.DLL and MSVCIRT.DLL. It leads to disaster if these filesare taken from the system directory of the machine where theinstaller is built, instead it must be absolutely made sure thatthese files come from the VCREDIST.EXE redistributable packagecontained in the MSVC SP5 CD. VCREDIST.EXE must be unpackedwith winzip, and the Wise Installation System prompts for thedirectory.
After building the installer, it should be opened with winzip,and the MS dlls extracted again and check for the same versionnumber as those unpacked from VCREDIST.EXE.
Thomas uploads this file to the starship. He then sends the RMa notice which includes the location and MD5 checksum of theWindows executable.
Note that Thomas’s creation of the Windows executable may generatea few more commits on the branch. Thomas will be responsible formerging Windows-specific changes from trunk to branch, and frombranch to trunk.
Now, you’re ready to build the source tarball. First cd to yourworking 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 uncommittedchanges in your working directory, but you may pick up some ofFred’s or Thomas’s last minute changes.
%cvstagr212
Be sure to tag only the python/dist/src subdirectory of thePython CVS tree!
%cd~%cvs-dcvs.sf.net:/cvsroot/pythonexport-rr212 \-dPython-2.1.2python/dist/src
%tar-cf-Python-2.1.2|gzip-9>Python-2.1.2.tgz%tar-cf-Python-2.1.2|bzip2-9>Python-2.1.2.tar.bz2
%md5sumPython-2.1.2.tgz
Note that if you don’t have the md5sum program, there is aPython replacement in the Tools/scripts/md5sum.py file.
%gpg-baPython-2.1.2.tgz%gpg-baPython-2.1.2.tar.bz2%gpg-baPython-2.1.2.exe
% cd /tmp% tar zxvf ~/Python-2.1.2.tgz% cd Python-2.1.2% ls(Do things look reasonable?)% ./configure(Loads of configure output)% make test(Do all the expected tests pass?)
If the tests pass, then you can feel good that the tarball isfine. If some of the tests fail, or anything else about thefreshly unpacked directory looks weird, you better stop now andfigure out what the problem is.
%cd.../pydotorg%cp-r2.2.22.2.3%rm-rf2.2.3/CVS%cvsadd2.2.3%cd2.2.3
So, there’s a directory called “2.2” which containsPython-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 followingaddresses:
python-list@python.orgpython-announce@python.orgpython-dev@python.org
Feel free to remove any old news items.
Now it’s time to do some cleanup. These steps are very important!
#define PY_VERSION "2.1.2+"Make sure that the otherPY_ version macros contain thecorrect values. Commit this change.
%makedistclean%./configure%maketest
To ensure that the regression test suite passes. If not, youscrewed up somewhere!
Step 5 …
Verify! This can be interleaved with Step 4. Pretend you’re auser: download the files from python.org, and make Python fromit. This step is too easy to overlook, and on several occasionswe’ve had useless release files. Once a general server problemcaused mysterious corruption of all files; once the source tarballgot built incorrectly; more than once the file upload process onSF truncated files; and so on.
Rejoice. Drink. Be Merry. Write a PEP like this one. Or belike unto Guido and take A Vacation.
You’ve just made a Python release!
Actually, there is one more step. You should turn over ownershipof the branch to Jack Jansen. All this means is that now he willbe responsible for making commits to the branch. He’s going touse this to build the MacOS versions. He may send you informationabout the Mac release that should be merged into the informationalpages on www.python.org. When he’s done, he’ll tag the branchsomething like “rX.YaZ-mac”. He’ll also be responsible formerging any Mac-related changes back into the trunk.
The Final release of any major release, e.g. Python 2.2 final, hasspecial requirements, specifically because it will be one of thelongest lived releases (i.e. betas don’t last more than a coupleof weeks, but final releases can last for years!).
For this reason we want to have a higher coordination between thethree major releases: Windows, Mac, and source. The Windows andsource releases benefit from the close proximity of the respectiverelease-bots. But the Mac-bot, Jack Jansen, is 6 hours away. Sowe add this extra step to the release process for a finalrelease:
The python.org site also needs some tweaking when a new bugfix releaseis issued.
Windows has a GUI installer, various flavors of Windows have“special limitations”, and the Windows installer also packsprecompiled “foreign” binaries (Tcl/Tk, expat, etc). So Windowstesting is tiresome but very necessary.
Concurrent with uploading the installer, Thomas installs Pythonfrom it twice: once into the default directory suggested by theinstaller, and later into a directory with embedded spaces in itsname. For each installation, he runs the full regression suitefrom a DOS box, and both with and without -0.
He also triesevery shortcut created under Start -> Menu -> thePython group. When trying IDLE this way, you need to verify thatHelp -> Python Documentation works. When trying pydoc this way(the “Module Docs” Start menu entry), make sure the “StartBrowser” button works, and make sure you can search for a randommodule (Thomas uses “random” <wink>) and then that the “go toselected” button works.
It’s amazing how much can go wrong here – and even more amazinghow often last-second checkins break one of these things. Ifyou’re “the Windows geek”, keep in mind that you’re likely theonly person routinely testing on Windows, and that Windows issimply a mess.
Repeat all of the above on at least one flavor of Win9x, and oneof 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 timerelease files are ready to download Thomas has generally run manyWindows tests on the installer he uploaded, he usually doesn’t doanything for Step 5 except a full byte-comparison (“fc /b” ifusing a Windows shell) of the downloaded file against the file heuploaded.
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 GMT