Process for upgrading the stdlib to a new cpython version
==========================================================

.. note::

    overly detailed

0. make sure your working dir is clean
1. check out the branch vendor/stdlib-3.8
2. upgrade the files there
   2a. `rm -rf lib-python/3/*`
   2b. copy the files from the cpython repo
   2c. copy `Modules/_ctypes/_ctypes_test.c` and `Modules/_testcapimodule.c` to `lib_pypy/`
   2d. `hg add lib-python/3/`
   2e. `hg remove --after`
   2f. show copied files in cpython repo by running appropriate git commands
   2g. fix copies / renames manually by running `hg copy --after <from> <to>` for each copied file
3. update stdlib-version.txt with the output of `git status` from the cpython repo
4. commit
5. update to py3.7
6. create a integration branch for the new stdlib
   (just hg branch stdlib-$version)
7. merge vendor/stdlib or vendor/stdlib-3-*
8. update python versions in pypy/module/sys/version.py and
   pypy/module/cpyext/include/patchlevel.h
9. commit
10. fix issues
11. commit --close-branch
