Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25455dc

Browse files
authored
Mejorar las instrucciones de migración de versiones (#1839)
Preparando la migración de 3.10 a 3.11 las notasrequerían cambios desde la migración pasada (desde 3.9 a 3.10)que no estaban incluídas.closes#1551
1 parent9866be2 commit25455dc

File tree

1 file changed

+61
-10
lines changed

1 file changed

+61
-10
lines changed

‎.overrides/upgrade-python-version.rst

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,93 @@
11
:orphan:
22

3-
=======================================
4-
How to update to a new Python version
5-
=======================================
3+
How to update to a new Python version
4+
=====================================
65

7-
We are currently in branch 3.7, and we want to update the strings from 3.8.
6+
We are currently in branch 3.10, and we want to update the strings from 3.11.
87

98

10-
#. Fetch the `lastet commit of 3.8 branch<https://github.com/python/cpython/commit/70fe95cdc9ac1b00d4f86b7525dca80caf7003e1>`_::
9+
#. Make sure you are in a clean state of the branch 3.10
10+
11+
#. Create a new branch
12+
13+
#. Fetch the `latest commit of 3.10 branch<https://github.com/python/cpython/commit/69b6b56d857440183e227ca0b10c84bca4239985>`_::
1114

1215
cd cpython/
13-
git fetch --depth 1 origin 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1
16+
git fetch --depth 1 origin 69b6b56d857440183e227ca0b10c84bca4239985
17+
18+
.. 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.
1421

1522
#. Checkout that commit locally::
1623

17-
git checkout 70fe95cdc9ac1b00d4f86b7525dca80caf7003e1
24+
git checkout 69b6b56d857440183e227ca0b10c84bca4239985
25+
26+
#. Update the branch on the `Makefile` and check the `requirements.txt` from
27+
the cpython repository, to see if upgrades on the modules like sphinx is
28+
needed.
29+
30+
#. Verify that the docs build with the new versions you changed from
31+
`requirements.txt` mainly the sphinx version.
32+
33+
#. Commit the update of the submodule change::
34+
35+
git add cpython
36+
git commit -m "Update the cpython submodule"
37+
38+
.. note:: This is important, so the later `make build` step will not reset
39+
the cpython submodule to the previous hash on the old branch.
1840

1941
#. Clean possible garbage (form previous builds)::
2042

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

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.
48+
49+
#. Create a virtual environment and install the dependencies of the project::
50+
51+
python -m venv env
52+
source env/bin/activate # Windows: env\Scripts\activate.bat
53+
pip install -r requirements.txt
54+
55+
2356
#. Create the .po files from the new source code. This will generate all the .po files for version 3.8::
2457

2558
SPHINX_GETTEXT=True sphinx-build -j auto -b gettext -d _build/doctrees . ../python-docs-es-pot
2659

2760
.. note::
2861

29-
In `../python-docs-es-pot` directory, we will have the new .pot files with new strings from 3.8 branch.
30-
All these strings will be *unstranslated* at this point.
62+
In `../python-docs-es-pot` directory, we will have the new .pot files with new strings from 3.11 branch.
63+
All these strings will be *untranslated* at this point.
3164

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

3467
sphinx-intl update --language es --pot-dir ../python-docs-es-pot --locale-dir cpython/locales/
3568

36-
#. Remove `python-docs-cpython/` prefix added by `sphinx-build` to avoid clazy diffs::
69+
#. At this point, all the `.po` files will have a different comment on each translation phrase,
70+
for example::
71+
72+
-#: ../Doc/whatsnew/3.9.rst:3
73+
+#: ../python-docs-es/cpython/Doc/whatsnew/3.9.rst:3
74+
75+
As you can see, it added the path of the local repository, but you can
76+
remove it from it with this regular expression::
3777

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

80+
..note:: if you have your local repository cloned with a different name,
81+
please make sure to adapt the expression.
82+
4083
#. Pass `powrap` to make the column widths consistent::
4184

4285
powrap --modified
86+
87+
#. Prepare for fireworks! Now it's time for an initial build::
88+
89+
make build
90+
91+
you will find many warnings that needs to be fixed before the push
92+
of the new branch is done. So prepare a cup of any hot beverage
93+
and fix them.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp