Skip to content

Commit 85afe7c

Browse files
committed
Updates while doing the stream with Cristian and Marcos
1 parent 58c3e8c commit 85afe7c

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

.overrides/upgrade-python-version.rst

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,59 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
88

99
#. Make sure you are in a clean state of the branch 3.10
1010

11-
#. Create a new branch
11+
#. Create a new branch called ``3.11``
1212

13-
#. Fetch the `latest commit of 3.10 branch <https://github.com/python/cpython/commit/69b6b56d857440183e227ca0b10c84bca4239985>`_::
13+
#. Initialize the submodules::
14+
15+
git submodule init
16+
git submodule update
17+
18+
#. Fetch the `latest commit of 3.11 branch <https://github.com/python/cpython/commit/69b6b56d857440183e227ca0b10c84bca4239985>`_::
1419

1520
cd cpython/
16-
git fetch --depth 1 origin 69b6b56d857440183e227ca0b10c84bca4239985
21+
git fetch --depth 1 origin b3cafb60afeb2300002af9982d43703435b8302d
1722

1823
.. note:: you could also base the hash on the 'git tag' from the desired
19-
version: `git checkout tags/v3.11.0 -b 3.11` considering that
20-
`3.11` doesn't exist locally.
24+
version: ``git checkout tags/v3.11.0 -b 3.11`` considering that
25+
``3.11`` doesn't exist locally.
2126

2227
#. Checkout that commit locally::
2328

2429
git checkout 69b6b56d857440183e227ca0b10c84bca4239985
2530

26-
#. Update the branch on the `Makefile` and check the `requirements.txt` from
31+
#. Update the branch on the ``Makefile`` and check the ``requirements.txt`` from
2732
the cpython repository, to see if upgrades on the modules like sphinx is
2833
needed.
2934

30-
#. Verify that the docs build with the new versions you changed from
31-
`requirements.txt` mainly the sphinx version.
32-
3335
#. Commit the update of the submodule change::
3436

3537
git add cpython
3638
git commit -m "Update the cpython submodule"
3739

38-
.. note:: This is important, so the later `make build` step will not reset
40+
.. note:: This is important, so the later ``make build`` step will not reset
3941
the cpython submodule to the previous hash on the old branch.
4042

43+
#. Verify that the docs build with the new versions you changed from
44+
``requirements.txt`` mainly the sphinx version::
45+
46+
make html
47+
48+
.. note::
49+
50+
It may fail the build because there may be files
51+
that don't exist anymore in the new branch.
52+
If that's the case, just continue with the steps
53+
and verify the build later.
54+
4155
#. Clean possible garbage (form previous builds)::
4256

4357
rm -rf _build ../python-docs-es-pot cpython/Doc/CONTRIBUTING.rst cpython/Doc/upgrade-python-version.rst
4458

45-
.. note: the 'python-docs-es-pot' is a temporary directory that is created
46-
in the next step. It's included here because it might be a leftover
47-
from previous attempts on your machine.
59+
.. note::
60+
61+
The 'python-docs-es-pot' is a temporary directory that is created
62+
in the next step. It's included here because it might be a leftover
63+
from previous attempts on your machine.
4864

4965
#. Create a virtual environment and install the dependencies of the project::
5066

@@ -59,31 +75,38 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
5975

6076
.. note::
6177

62-
In `../python-docs-es-pot` directory, we will have the new .pot files with new strings from 3.11 branch.
78+
In ``../python-docs-es-pot`` directory, we will have the new .pot files with new strings from 3.11 branch.
6379
All these strings will be *untranslated* at this point.
6480

6581
#. Now, we update our translated files form the source language (English) with new strings::
6682

6783
sphinx-intl update --language es --pot-dir ../python-docs-es-pot --locale-dir cpython/locales/
6884

69-
#. At this point, all the `.po` files will have a different comment on each translation phrase,
85+
#. At this point, all the ``.po`` files will have a different comment on each translation phrase,
7086
for example::
7187

72-
-#: ../Doc/whatsnew/3.11.rst:3
73-
+#: ../python-docs-es/cpython/Doc/whatsnew/3.11.rst:3
88+
-#: ../python-docs-es/cpython/Doc/whatsnew/3.11.rst:3
89+
+#: ../Doc/whatsnew/3.11.rst:3
7490

7591
As you can see, it added the path of the local repository, but you can
7692
remove it from it with this regular expression::
7793

7894
sed -i **/*.po -e "s|python-docs-es/cpython/||g"
7995

80-
..note:: if you have your local repository cloned with a different name,
81-
please make sure to adapt the expression.
96+
.. note::
97+
98+
If you have your local repository cloned with a different name,
99+
please make sure to adapt the expression.
82100

83-
#. Pass `powrap` to make the column widths consistent::
101+
#. Pass ``powrap`` to make the column widths consistent::
84102

85103
powrap --modified
86104

105+
.. note::
106+
107+
Make sure you have installed ``gettext``,
108+
since it's required for the previous command.
109+
87110
#. Prepare for fireworks! Now it's time for an initial build::
88111

89112
make build

0 commit comments

Comments
 (0)