Debian Codegraph @

pypy/doc/how-to-release.rst

raw
1 PyPy's Release Process
2 ========================
3
4 Release Policy
5 ++++++++++++++
6
7 We try to create a stable release a few times a year. These are released on
8 a branch named like release-pypy3.5-v2.x or release-pypy3.5-v4.x, and each
9 release is tagged, for instance release-pypy3.5-v4.0.1.
10
11 The release version number should be bumped. A micro release increment means
12 there were no changes that justify rebuilding c-extension wheels, since
13 the wheels are marked with only major.minor version numbers. It is ofen not
14 clear what constitutes a "major" release verses a "minor" release, the release
15 manager can make that call.
16
17 After release, inevitably there are bug fixes. It is the responsibility of
18 the committer who fixes a bug to make sure this fix is on the release branch,
19 so that we can then create a tagged bug-fix release, which will hopefully
20 happen more often than stable releases.
21
22 How to Create a PyPy Release
23 ++++++++++++++++++++++++++++
24
25 As a meta rule setting up issues in the tracker for items here may help not
26 forgetting things. A set of todo files may also work.
27
28 Check and prioritize all issues for the release, postpone some if necessary,
29 create new issues also as necessary. An important thing is to get
30 the documentation into an up-to-date state!
31
32
33 Release Steps
34 ++++++++++++++
35
36 Make the release branch
37 ------------------------
38
39 This is needed only in case you are doing a new major version; if not, you can
40 probably reuse the existing release branch.
41
42 We want to be able to freely merge default into the branch and vice-versa;
43 thus we need to do a complicate dance to avoid to patch the version number
44 when we do a merge::
45
46 $ git checkout release-pypy2.7-v7.x
47 $ # edit the version to e.g. 7.0.0-final
48 $ git commit -a
49 $ git checkout main
50 $ # edit the version to 7.1.0-alpha0
51 $ git commit -a
52 $ git checkout release-pypy2.7-v7.x
53 $ git merge main
54 $ # clear merge conflicts in a way that keeps 7.0.0-final
55 $ git commit -a
56
57 Then, we need to do the same for the ``release-pypy3*`` branch(es)
58
59 To change the version, you need to edit some files:
60
61 - ``module/sys/version.py``: the ``PYPY_VERSION`` should be something like
62 ``(7, 3, 10, "final", 0)`` or ``(7, 3, 9, "candidate", 2)`` for rc2.
63
64 - ``module/cpyext/include/patchlevel.h``: the ``PYPY_VERSION`` should be
65 something like "7.3.10" for the final release or "7.3.10-candidate3" for
66 rc3.
67
68 - ``doc/conf.py`` in both ``rpython`` and ``pypy``.
69
70 Add tags to the repo. Never change tags once committed: it breaks downstream
71 packaging workflows.
72
73 - Make sure the version checks pass (they ensure ``version.py`` and
74 ``patchlevel.h`` agree)
75 - Make sure the tag matches the version in version.py/patchlevel.h. You
76 can run the repackage.sh script without pushing the tags after the
77 buildbots run.
78 - Once the repackage script runs, be sure to push the tags ``git push
79 --tags``
80
81 Other steps
82 -----------
83
84 * Make sure the RPython builds on the buildbot pass with no failures
85
86 * Maybe bump the SOABI number in module/imp/importing. This has many
87 implications, so make sure the PyPy community agrees to the change.
88 Wheels will use the major.minor release numbers in the name, so bump
89 them if there is an incompatible change to cpyext.
90
91 * Make sure the binary-testing_ CI is clean, or that the failures are understood.
92
93 * Update and write documentation
94
95 * update pypy/doc/contributor.rst (and possibly LICENSE)
96 pypy/doc/tool/makecontributor.py generates the list of contributors
97
98 * write release announcement pypy/doc/release-VERSION.rst
99 The release announcement should contain a direct link to the download page
100
101 * Add the new files to pypy/doc/index-of-release-notes.rst
102
103 * Build and upload the release tar-balls
104
105 * go to https://buildbot.pypy.org/builders and force builds for the proper
106 branches The following JIT binaries should be built: windows-64, linux-32,
107 linux-64, macos_x86_64, macos_arm64, aarch64
108
109 * wait for builds to complete, make sure there are no failures
110
111 * send out a mailing list message asking for people to test before uploading
112 to prevent having to upload more than once
113
114 * add a tag on the pypy/jitviewer repo that corresponds to pypy release, so
115 that the source tarball can be produced in the next steps
116
117 * download the builds, repackage binaries. Tag the release-candidate version
118 (it is important to mark this as a candidate since usually at least two
119 tries are needed to complete the process) and download and repackage source
120 from the buildbot. You may find it convenient to use the ``repackage.sh``
121 script in ``pypy/tool/release`` to do this.
122
123 Also repackage and upload source "-src.tar.bz2"
124
125 * Upload binaries to https://buildbot.pypy.org/mirror. Add the files to
126 the ``versions.json`` in ``pypy/tools/release``, upload it, and run the
127 ``check_versions.py`` file in that directory. This file is used by various
128 downstream tools like "github actions" to find valid pypy downloads. It
129 takes an hour for https://downloads.python.org/pypy/ to sync. Note the
130 "latest_pypy" attribute: it is per-python-version. So if the new release
131 overrides a current latest_pypy (both are 2.7.18, for instance), you must
132 find the older version and set its "lastest_pypy" to "false" or
133 ``check_versions.py`` (and the various tools) will fail.
134
135 * Send out a mailing list message asking for last-minute comments and testing
136
137 * RELEASE !
138
139 * update pypy.org_ with the checksum hashes produced from the
140 ``repackage.sh`` script or by hand and the download pages
141
142 * update the release note and the index with the release date
143
144 * post announcement on pypy.org
145 * send announcements to twitter.com, pypy-dev, python-list,
146 python-announce, python-dev ...
147
148 * If all is OK, document the released version and suggest popular tools update
149 to support it. Github actions will pick up the versions.json.
150
151 * add a tag on the codespeed web site that corresponds to pypy release
152 * revise versioning at https://readthedocs.org/projects/pypy
153 * suggest updates to multibuild_ and cibuildwheel_
154
155 .. _multibuild: https://github.com/matthew-brett/multibuild
156 .. _cibuildwheel: https://github.com/joerick/cibuildwheel
157 .. _binary-testing: https://github.com/pypy/binary-testing/actions
158 .. _pypy.org: https://github.com/pypy/pypy.org