File: stdlib-upgrade.txt

package info (click to toggle)
pypy3 7.3.21%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 214,008 kB
  • sloc: python: 2,110,343; ansic: 542,926; sh: 21,463; asm: 14,419; cpp: 4,451; makefile: 4,209; objc: 761; xml: 530; exp: 499; javascript: 314; pascal: 244; lisp: 45; csh: 12; awk: 4
file content (53 lines) | stat: -rw-r--r-- 2,064 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Process for upgrading the stdlib to a new cpython version
==========================================================

.. note::

    overly detailed

0. make sure your working dir is clean
1. check out this branch
2. upgrade the files there
   2a. `rm -rf lib-python/3/*`
   2b. copy the files from the cpython repo
   2c. copy to `lib_pypy`
     - `Modules/_ctypes/_ctypes_test.c`
     - `Modules/_testcapimodule.c`
     - `Modules/_testcapi_feature_macros.inc`
     - `Modules/_testmultiphase.c`
     - `Modules/clinic/_testmultiphase.c.h`
   2d. `git add lib-python/3/`
   2e. show copied files in cpython repo by running appropriate git commands
   2f. fix copies / renames manually
   2g. Do not delete the CPython token.py, it is needed for app_main tests
3. update stdlib-version.txt with the output of `git status` from the cpython repo
4. commit
5. update to py3.11
6. create a integration branch for the new stdlib
   (just git branch stdlib-$version)
7. merge vendor/stdlib or vendor/stdlib-3-*
8. commit
10. fix issues. Note especially changes in datetime.py, venv/__init__.py, and others.
11. commit --close-branch
14. update version numbers in sys/version.py and cpyext/include/patch_level.h

Process for updating a point release if the diff is small
=========================================================

In cpython, do `git diff -r <current> -r <newer> Lib > <outfile>`
so for instance `git diff -r v3.9.7 -r v3.9.9 Lib > /tmp/patch3.9.9`

In pypy, cd into `lib-python/3`
Then do 
patch -p2 -i <outfile>

If patch asks about reversed patches, reply "no" and apply anyway "yes"

Carefully note the failures in the *.rej files and try to resolve the conflicts.
Delete all the *.orig files, and look for files that should be added to version control
Look for removed files that should be deleted from version control

Then update sys/version.py, cpyext/include/patchlevel.h, and ./stdlib-version.txt

Make sure binary files (especially pip and setuptools wheels) were copied
correctly. On at least one occasion they were empty after this process.