Skip to content

Commit 435de3a

Browse files
authored
Merge branch 'python:3.11' into 3.11
2 parents 758524b + f2d8cd4 commit 435de3a

File tree

375 files changed

+108826
-91165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+108826
-91165
lines changed

.github/workflows/main.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ on:
99
jobs:
1010
test:
1111
name: Test
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-22.04
1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Preparar Python v3.10
15+
- name: Preparar Python v3.11
1616
uses: actions/setup-python@v2
1717
with:
18-
python-version: "3.10"
18+
python-version: "3.11"
1919
- name: Sincronizar con CPython
2020
run: |
2121
git submodule update --init --depth=1 cpython
@@ -36,4 +36,14 @@ jobs:
3636
run: |
3737
python scripts/check_spell.py
3838
- name: Construir documentación
39-
run: PYTHONWARNINGS=ignore::FutureWarning sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html
39+
run: |
40+
# FIXME: Relative paths for includes in 'cpython'
41+
sed -i -e 's|.. include:: ../includes/wasm-notavail.rst|.. include:: ../../../../includes/wasm-notavail.rst|g' cpython/Doc/**/*.rst
42+
sed -i -e 's|.. include:: ../distutils/_setuptools_disclaimer.rst|.. include:: ../../../../distutils/_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
43+
sed -i -e 's|.. include:: ./_setuptools_disclaimer.rst|.. include:: ../../../_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
44+
sed -i -e 's|.. include:: token-list.inc|.. include:: ../../../token-list.inc|g' cpython/Doc/**/*.rst
45+
sed -i -e 's|.. include:: ../../using/venv-create.inc|.. include:: ../using/venv-create.inc|g' cpython/Doc/**/*.rst
46+
sed -i -e 's|.. include:: ../../../using/venv-create.inc|.. include:: ../../using/venv-create.inc|g' cpython/Doc/**/*.rst
47+
sed -i -e 's|.. include:: /using/venv-create.inc|.. include:: ../../../../using/venv-create.inc|g' cpython/Doc/**/*.rst
48+
# Normal build
49+
PYTHONWARNINGS=ignore::FutureWarning,ignore::RuntimeWarning sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ coverage.xml
7575

7676
# OSX
7777
.DS_Store
78+
79+
.potodo/
80+
git_diff.po
81+
CONTRIBUTING.po
82+
reviewers-guide.po
83+
upgrade-python-version.po

.overrides/CONTRIBUTING.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ contribución, queremos señalar algunos
1717
.. note::
1818

1919
Si tienes cualquier duda, puedes enviarnos un email a docs-es@python.org.
20+
21+
También puedes unirte a `nuestro canal de Telegram`_ si necesitas ayuda.
22+
2023

2124
Antes de comenzar
2225
-----------------
@@ -64,11 +67,11 @@ Antes de comenzar
6467

6568
#. Selecciona un :ref:`archivo para traducir <que-archivo-traducir>`.
6669

67-
#. Verifica que estás en la rama principal del repositorio, **3.10** (esto es muy
70+
#. Verifica que estás en la rama principal del repositorio, **3.11** (esto es muy
6871
importante para evitar crear una nueva rama a partir de una traducción
6972
anterior)::
7073

71-
git checkout 3.10
74+
git checkout 3.11
7275

7376
#. Crea una rama nueva en base al artículo en el que vayas a trabajar. Por
7477
ejemplo, si vas a trabajar en el archivo ``library/glosario.po``, usa un nombre
@@ -182,11 +185,6 @@ A tener en cuenta
182185
esperamos en nuestro chat en telegram. ¡Gracias!
183186

184187

185-
.. note::
186-
187-
También puedes unirte a `nuestro canal de Telegram`_ si necesitas ayuda.
188-
189-
190188
Previsualizar los cambios
191189
-------------------------
192190

.overrides/faq.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ repositorio principal de la traducción). Se hace de la siguiente manera::
204204

205205
Luego nos vamos a nuestra rama local, confirmamos e impactamos esos cambios::
206206

207-
git checkout 3.10
208-
git merge upstream/3.10
209-
git push origin 3.10
207+
git checkout 3.11
208+
git merge upstream/3.11
209+
git push origin 3.11
210210

211211
¡Eso es todo!
212212

.overrides/progress.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ y otras estadísticas.
1010

1111
.. note::
1212

13-
Estas listas se actualiza automáticamente cuando Pull Requests se *mergean* a la rama ``3.10``.
13+
Estas listas se actualiza automáticamente cuando Pull Requests se *mergean* a la rama ``3.11``.
1414

1515

1616
En progreso

.overrides/upgrade-python-version.rst

+53-22
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/b3cafb60afeb2300002af9982d43703435b8302d>`_::
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

24-
git checkout 69b6b56d857440183e227ca0b10c84bca4239985
29+
git checkout b3cafb60afeb2300002af9982d43703435b8302d
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

@@ -53,41 +69,56 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
5369
pip install -r requirements.txt
5470

5571

56-
#. Create the .po files from the new source code. This will generate all the .po files for version 3.8::
72+
#. Create the .po files from the new source code. This will generate all the .po files for version 3.11::
5773

5874
SPHINX_GETTEXT=True sphinx-build -j auto -b gettext -d _build/doctrees . ../python-docs-es-pot
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.9.rst:3
73-
+#: ../python-docs-es/cpython/Doc/whatsnew/3.9.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
90113

91114
you will find many warnings that needs to be fixed before the push
92115
of the new branch is done. So prepare a cup of any hot beverage
93116
and fix them.
117+
118+
119+
Once the process is completely and you are happy with the results,
120+
there are a few extra steps to finish the process::
121+
122+
#. Upgrade GitHub Actions to use Python 3.11
123+
124+
#. Update Read the Docs project to use 3.11 in the build and also as default branch/version

.readthedocs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ sphinx:
1010
configuration: conf.py
1111

1212
build:
13-
os: ubuntu-20.04
13+
os: ubuntu-22.04
1414
tools:
15-
python: "3.10"
15+
python: "3.11"
1616

1717

1818
# Optionally set the version of Python and requirements required to build your docs

Makefile

+14-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
# Configuration
99

10-
CPYTHON_PATH := cpython #Current commit for this upstream repo is setted by the submodule
11-
BRANCH := 3.8
10+
CPYTHON_PATH := cpython # Current commit for this upstream repo is setted by the submodule
11+
BRANCH := 3.11
1212
LANGUAGE_TEAM := python-docs-es
1313
LANGUAGE := es
1414

@@ -19,7 +19,6 @@ CPYTHON_WORKDIR := cpython
1919
OUTPUT_DOCTREE := $(CPYTHON_WORKDIR)/Doc/build/doctree
2020
OUTPUT_HTML := $(CPYTHON_WORKDIR)/Doc/build/html
2121
LOCALE_DIR := $(CPYTHON_WORKDIR)/locale
22-
TRANSIFEX_PROJECT := python-docs-es
2322
POSPELL_TMP_DIR := .pospell
2423

2524

@@ -31,7 +30,6 @@ help:
3130
@echo " spell Check spelling"
3231
@echo " wrap Wrap all the PO files to a fixed column width"
3332
@echo " progress To compute current progression on the tutorial"
34-
@echo " dict_dups Check duplicated entries on the dict"
3533
@echo ""
3634

3735

@@ -41,7 +39,17 @@ help:
4139
# treated as errors, which is good to skip simple Sphinx syntax mistakes.
4240
.PHONY: build
4341
build: setup
44-
PYTHONWARNINGS=ignore::FutureWarning $(VENV)/bin/sphinx-build -j auto -W --keep-going -b html -d $(OUTPUT_DOCTREE) -D language=$(LANGUAGE) . $(OUTPUT_HTML) && \
42+
# FIXME: Relative paths for includes in 'cpython'
43+
# See more about this at https://github.com/python/python-docs-es/issues/1844
44+
sed -i -e 's|.. include:: ../includes/wasm-notavail.rst|.. include:: ../../../../includes/wasm-notavail.rst|g' cpython/Doc/**/*.rst
45+
sed -i -e 's|.. include:: ../distutils/_setuptools_disclaimer.rst|.. include:: ../../../../distutils/_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
46+
sed -i -e 's|.. include:: ./_setuptools_disclaimer.rst|.. include:: ../../../_setuptools_disclaimer.rst|g' cpython/Doc/**/*.rst
47+
sed -i -e 's|.. include:: token-list.inc|.. include:: ../../../token-list.inc|g' cpython/Doc/**/*.rst
48+
sed -i -e 's|.. include:: ../../using/venv-create.inc|.. include:: ../using/venv-create.inc|g' cpython/Doc/**/*.rst
49+
sed -i -e 's|.. include:: ../../../using/venv-create.inc|.. include:: ../../using/venv-create.inc|g' cpython/Doc/**/*.rst
50+
sed -i -e 's|.. include:: /using/venv-create.inc|.. include:: ../../../../using/venv-create.inc|g' cpython/Doc/**/*.rst
51+
# Normal build
52+
PYTHONWARNINGS=ignore::FutureWarning,ignore::RuntimeWarning $(VENV)/bin/sphinx-build -j auto -W --keep-going -b html -d $(OUTPUT_DOCTREE) -D language=$(LANGUAGE) . $(OUTPUT_HTML) && \
4553
echo "Success! Open file://`pwd`/$(OUTPUT_HTML)/index.html, " \
4654
"or run 'make serve' to see them in http://localhost:8000";
4755

@@ -71,7 +79,7 @@ venv:
7179
# Makefile's "serve" target. Run "build" before using this target.
7280
.PHONY: serve
7381
serve:
74-
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc serve
82+
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc htmlview
7583

7684

7785
# clean: remove all .mo files and the venv directory that may exist and

README.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.. image:: https://travis-ci.org/python/python-docs-es.svg?branch=3.10
2-
:target: https://travis-ci.org/python/python-docs-es
1+
.. image:: https://github.com/python/python-docs-es/actions/workflows/main.yml/badge.svg?branch=3.11
2+
:target: https://github.com/python/python-docs-es/actions?query=branch:3.11
33
:alt: Build Status
44

5-
.. image:: https://readthedocs.org/projects/python-docs-es/badge/?version=3.10
6-
:target: https://python-docs-es.readthedocs.io/es/3.10/?badge=3.10
5+
.. image:: https://readthedocs.org/projects/python-docs-es/badge/?version=3.11
6+
:target: https://python-docs-es.readthedocs.io/es/3.11/?badge=3.11
77
:alt: Documentation Status
88

99

@@ -32,7 +32,7 @@ Documentation Contribution Agreement
3232

3333
NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is
3434
maintained using a global network of volunteers. By posting this
35-
project on Transifex, Github, and other public places, and inviting
35+
project on Github, and other public places, and inviting
3636
you to participate, we are proposing an agreement that you will
3737
provide your improvements to Python's documentation or the translation
3838
of Python's documentation for the PSF's use under the CC0 license

TRANSLATORS

+2
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,15 @@ Ingrid Bianka Garcia Lino (@ibianka)
100100
Iracema Caballero (@iracaballero)
101101
Italo Farfán Vera
102102
Ivonne Yañez Mendoza (@TiaIvonne)
103+
Jaime Resano Aísa (@Jaime02)
103104
Jaime Rodrigo González Rodríguez (@jairock282)
104105
Jaume Montané (@jaumemy)
105106
Javier Artiga Garijo (@jartigag)
106107
Javier Daza (@javierdaza)
107108
Jhonatan Barrera (@iam3mer)
108109
Jonathan Aguilar (@drawsoek)
109110
Jorge Maldonado Ventura (@jorgesumle)
111+
José Daniel Gonzalez (@jdgc14)
110112
José Luis Cantilo (@jcantilo)
111113
José Luis Salgado Banda (@josephLSalgado)
112114
José Miguel Hernández Cabrera (@miguelheca)

0 commit comments

Comments
 (0)