- Notifications
You must be signed in to change notification settings - Fork396
Mejorar las instrucciones de migración de versiones#1839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
71 changes: 61 additions & 10 deletions.overrides/upgrade-python-version.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,93 @@ | ||
:orphan: | ||
How to update to a new Python version | ||
===================================== | ||
We are currently in branch 3.10, and we want to update the strings from 3.11. | ||
#. Make sure you are in a clean state of the branch 3.10 | ||
#. Create a new branch | ||
#. Fetch the `latest commit of 3.10 branch <https://github.com/python/cpython/commit/69b6b56d857440183e227ca0b10c84bca4239985>`_:: | ||
cd cpython/ | ||
git fetch --depth 1 origin 69b6b56d857440183e227ca0b10c84bca4239985 | ||
.. note:: you could also base the hash on the 'git tag' from the desired | ||
version: `git checkout tags/v3.11.0 -b 3.11` considering that | ||
`3.11` doesn't exist locally. | ||
#. Checkout that commit locally:: | ||
git checkout 69b6b56d857440183e227ca0b10c84bca4239985 | ||
#. Update the branch on the `Makefile` and check the `requirements.txt` from | ||
the cpython repository, to see if upgrades on the modules like sphinx is | ||
needed. | ||
#. Verify that the docs build with the new versions you changed from | ||
`requirements.txt` mainly the sphinx version. | ||
#. Commit the update of the submodule change:: | ||
git add cpython | ||
git commit -m "Update the cpython submodule" | ||
.. note:: This is important, so the later `make build` step will not reset | ||
the cpython submodule to the previous hash on the old branch. | ||
#. Clean possible garbage (form previous builds):: | ||
rm -rf _build ../python-docs-es-pot cpython/Doc/CONTRIBUTING.rst cpython/Doc/upgrade-python-version.rst | ||
.. note: the 'python-docs-es-pot' is a temporary directory that is created | ||
in the next step. It's included here because it might be a leftover | ||
from previous attempts on your machine. | ||
#. Create a virtual environment and install the dependencies of the project:: | ||
python -m venv env | ||
source env/bin/activate # Windows: env\Scripts\activate.bat | ||
pip install -r requirements.txt | ||
#. Create the .po files from the new source code. This will generate all the .po files for version 3.8:: | ||
SPHINX_GETTEXT=True sphinx-build -j auto -b gettext -d _build/doctrees . ../python-docs-es-pot | ||
.. note:: | ||
In `../python-docs-es-pot` directory, we will have the new .pot files with new strings from 3.11 branch. | ||
All these strings will be *untranslated* at this point. | ||
#. Now, we update our translated files form the source language (English) with new strings:: | ||
sphinx-intl update --language es --pot-dir ../python-docs-es-pot --locale-dir cpython/locales/ | ||
#. At this point, all the `.po` files will have a different comment on each translation phrase, | ||
for example:: | ||
-#: ../Doc/whatsnew/3.9.rst:3 | ||
+#: ../python-docs-es/cpython/Doc/whatsnew/3.9.rst:3 | ||
As you can see, it added the path of the local repository, but you can | ||
remove it from it with this regular expression:: | ||
sed -i **/*.po -e "s|python-docs-es/cpython/||g" | ||
..note:: if you have your local repository cloned with a different name, | ||
please make sure to adapt the expression. | ||
#. Pass `powrap` to make the column widths consistent:: | ||
powrap --modified | ||
#. Prepare for fireworks! Now it's time for an initial build:: | ||
make build | ||
you will find many warnings that needs to be fixed before the push | ||
of the new branch is done. So prepare a cup of any hot beverage | ||
and fix them. |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.