Debian Codegraph @

lib-python/stdlib-upgrade.txt

raw
1 Process for upgrading the stdlib to a new cpython version
2 ==========================================================
3
4 .. note::
5
6 overly detailed
7
8 0. make sure your working dir is clean
9 1. check out this branch
10 2. upgrade the files there
11 2a. `rm -rf lib-python/3/*`
12 2b. copy the files from the cpython repo
13 2c. copy to `lib_pypy`
14 - `Modules/_ctypes/_ctypes_test.c`
15 - `Modules/_testcapimodule.c`
16 - `Modules/_testcapi_feature_macros.inc`
17 - `Modules/_testmultiphase.c`
18 - `Modules/clinic/_testmultiphase.c.h`
19 2d. `git add lib-python/3/`
20 2e. show copied files in cpython repo by running appropriate git commands
21 2f. fix copies / renames manually
22 2g. Do not delete the CPython token.py, it is needed for app_main tests
23 3. update stdlib-version.txt with the output of `git status` from the cpython repo
24 4. commit
25 5. update to py3.11
26 6. create a integration branch for the new stdlib
27 (just git branch stdlib-$version)
28 7. merge vendor/stdlib or vendor/stdlib-3-*
29 8. commit
30 10. fix issues. Note especially changes in datetime.py, venv/__init__.py, and others.
31 11. commit --close-branch
32 14. update version numbers in sys/version.py and cpyext/include/patch_level.h
33
34 Process for updating a point release if the diff is small
35 =========================================================
36
37 In cpython, do `git diff -r <current> -r <newer> Lib > <outfile>`
38 so for instance `git diff -r v3.9.7 -r v3.9.9 Lib > /tmp/patch3.9.9`
39
40 In pypy, cd into `lib-python/3`
41 Then do
42 patch -p2 -i <outfile>
43
44 If patch asks about reversed patches, reply "no" and apply anyway "yes"
45
46 Carefully note the failures in the *.rej files and try to resolve the conflicts.
47 Delete all the *.orig files, and look for files that should be added to version control
48 Look for removed files that should be deleted from version control
49
50 Then update sys/version.py, cpyext/include/patchlevel.h, and ./stdlib-version.txt
51
52 Make sure binary files (especially pip and setuptools wheels) were copied
53 correctly. On at least one occasion they were empty after this process.