Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39be902

Browse files
authored
Merge branch '3.12' into script_complete_index
2 parents 26bb8ba + 23991c3 commit 39be902

Some content is hidden

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

74 files changed

+1757
-1581
lines changed

.github/workflows/main.yml

Lines changed: 58 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,86 @@ on:
66
- 3.*
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
name: Test
1215
runs-on: ubuntu-22.04
1316
steps:
17+
# Obtención del código
1418
- uses: actions/checkout@v4
19+
with:
20+
submodules: 'true'
21+
# Necesario para que tj-actions/changed-files se ejecute
22+
# dentro de un tiempo adecuado
23+
fetch-depth: 2
24+
25+
# Instalación de dependencias
1526
- name: Preparar Python v3.11
16-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
1728
with:
1829
python-version: "3.11"
1930
cache: "pip"
20-
- name: Sincronizar con CPython
21-
run: |
22-
git submodule update --init --depth=1 cpython
23-
- name: Instalar dependencias
31+
- name: Configura dpkg/apt para ejecutarse de manera eficiente
32+
uses: abbbi/github-actions-tune@v1
33+
- name: Deshabilita triggers de postgresql-common
34+
run: sudo sed -i '/postgresql-common/d' /var/lib/dpkg/triggers/File
35+
- name: Instalar dependencias de sistema
2436
run: |
2537
sudo apt-get update
26-
sudo apt-get install -y hunspell hunspell-es gettext language-pack-es
38+
sudo apt-get install -y hunspell hunspell-es gettext language-pack-es locales-all
39+
- name: Instalar dependencias de Python
40+
run: |
2741
python -m pip install -r requirements.txt
42+
- name: Listar paquetes y versiones
43+
run: |
2844
pip list
2945
pospell --version
3046
powrap --version
47+
48+
# Cálculo de los archivos .po a verificar.
49+
# En el caso de un PR, sólo se chequean los .po que se están editando,
50+
# mientras que en caseo de un push a las ramas 3.* queremos revisar
51+
# todos los archivos
52+
- name: Obtiene la lista de archivos .po con cambios (sólo en PRs)
53+
if: github.event_name == 'pull_request'
54+
id: changed-po-files
55+
uses: tj-actions/changed-files@v40
56+
with:
57+
files: |
58+
**/*.po
59+
- name: Calcula lista de archivos .po a revisar
60+
id: po-files-to-check
61+
env:
62+
PO_FILES_TO_CHECK: ${{ steps.changed-po-files.conclusion == 'skipped' && '**/*.po' || steps.changed-po-files.outputs.all_changed_files }}
63+
run: |
64+
echo "po_files_to_check=$PO_FILES_TO_CHECK" >> $GITHUB_OUTPUT
65+
echo "any_po_files_to_check=`test -n \"$PO_FILES_TO_CHECK\" && echo true || echo false`" >> $GITHUB_OUTPUT
66+
- name: Muestra outputs de steps anteriores para debugueo
67+
env:
68+
CHANGED_PO_FILES: ${{ toJson(steps.changed-po-files) }}
69+
PO_FILES_TO_CHECK: ${{ toJson(steps.po-files-to-check) }}
70+
run: |
71+
echo "steps.changed-po-files=$PO_FILES_TO_CHECK"
72+
echo "steps.po-files-to-change.$CHANGED_PO_FILES"
73+
74+
# Chequeos a realizar
3175
- name: TRANSLATORS
3276
run: |
3377
diff -Naur TRANSLATORS <(LANG=es python scripts/sort.py < TRANSLATORS)
3478
- name: Powrap
35-
run: powrap --check --quiet **/*.po
79+
if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true'
80+
run: powrap --check --quiet ${{ steps.po-files-to-check.outputs.po_files_to_check }}
3681
- name: Sphinx lint
37-
run: |
38-
sphinx-lint */*.po
82+
if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true'
83+
run: sphinx-lint ${{ steps.po-files-to-check.outputs.po_files_to_check }}
3984
- name: Pospell
40-
run: |
41-
python scripts/check_spell.py
85+
if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true'
86+
run: python scripts/check_spell.py ${{ steps.po-files-to-check.outputs.po_files_to_check }}
87+
88+
# Construcción de la documentación
4289
- name: Construir documentación
4390
run: |
4491
# FIXME: Relative paths for includes in 'cpython'

.github/workflows/pr-comment.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Agrega comentario a PR
2+
3+
on:
4+
pull_request_target:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
define-comment:
11+
name: Entradas sin traducción
12+
runs-on: ubuntu-22.04
13+
outputs:
14+
any_changed: ${{ steps.changed-files.outputs.any_changed }}
15+
comment: ${{ steps.create-pr-comment.outputs.comment }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
ref: ${{ github.event.pull_request.head.sha }}
20+
persist-credentials: false
21+
- name: Preparar Python v3.11
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.11"
25+
cache: "pip"
26+
# checkout these files from the base branch to guarantee they haven't been
27+
# modified by the PR
28+
- uses: actions/checkout@v4
29+
with:
30+
path: base-branch
31+
sparse-checkout-cone-mode: false
32+
sparse-checkout: |
33+
requirements.txt
34+
scripts/list_missing_entries.py
35+
- name: Instalar dependencias
36+
run: |
37+
python -m pip install -r base-branch/requirements.txt
38+
- name: Obtiene lista de archivos con cambios
39+
id: changed-files
40+
uses: tj-actions/changed-files@v40
41+
with:
42+
files: |
43+
**/*.po
44+
- name: Calcular entradas faltantes
45+
if: steps.changed-files.outputs.any_changed == 'true'
46+
id: create-pr-comment
47+
env:
48+
CHANGED_PO_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
49+
run: |
50+
{
51+
echo 'comment<<EOF'
52+
python base-branch/scripts/list_missing_entries.py --github $CHANGED_PO_FILES
53+
echo EOF
54+
} >> "$GITHUB_OUTPUT"
55+
56+
write-comment:
57+
runs-on: ubuntu-22.04
58+
needs: [define-comment]
59+
if: needs.define-comment.outputs.any_changed == 'true'
60+
permissions:
61+
issues: write
62+
pull-requests: write
63+
steps:
64+
- name: Agregar comentario con entradas faltantes
65+
uses: thollander/actions-comment-pull-request@v2
66+
with:
67+
message: ${{ needs.define-comment.outputs.comment }}
68+
comment_tag: missing-entries

.github/workflows/stale.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ on:
33
schedule:
44
- cron: '30 1 * * *'
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
stale:
811
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
915
steps:
10-
- uses: actions/stale@v8
16+
- uses: actions/stale@v9
1117
with:
1218
stale-pr-label: 'needs decision'
1319
stale-issue-label: 'stale'

.overrides/upgrade-python-version.rst

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,32 @@
33
How to update to a new Python version
44
=====================================
55

6-
We are currently in branch 3.10, and we want to update the strings from 3.11.
6+
We are currently in branch 3.11, and we want to update the strings from 3.12.
77

8+
#. Make sure you are in a clean state of the branch 3.11
89

9-
#. Make sure you are in a clean state of the branch 3.10
10-
11-
#. Create a new branch called ``3.11``
10+
#. Create a new branch called ``3.12``
1211

1312
#. Initialize the submodules::
1413

1514
git submodule init
1615
git submodule update
1716

18-
#. Fetch the `latest commit of 3.11 branch <https://github.com/python/cpython/commit/b3cafb60afeb2300002af9982d43703435b8302d>`_::
17+
#. Fetch the `latest commit of 3.12 branch <https://github.com/python/cpython/commit/0fb18b02c8ad56299d6a2910be0bab8ad601ef24>`_::
1918

2019
cd cpython/
21-
git fetch --depth 1 origin b3cafb60afeb2300002af9982d43703435b8302d
20+
git fetch --depth 1 origin 0fb18b02c8ad56299d6a2910be0bab8ad601ef24
2221

2322
.. note:: you could also base the hash on the 'git tag' from the desired
24-
version: ``git checkout tags/v3.11.0 -b 3.11`` considering that
25-
``3.11`` doesn't exist locally.
23+
version: ``git checkout tags/v3.12.0 -b 3.12`` considering that
24+
``3.12`` doesn't exist locally.
2625

2726
#. Checkout that commit locally::
2827

29-
git checkout b3cafb60afeb2300002af9982d43703435b8302d
28+
git checkout 0fb18b02c8ad56299d6a2910be0bab8ad601ef24
3029

3130
#. Update the branch on the ``Makefile`` and check the ``requirements.txt`` from
32-
the cpython repository, to see if upgrades on the modules like sphinx is
31+
``./cpython/Doc`` directory, to see if upgrades on the modules like sphinx is
3332
needed.
3433

3534
#. Commit the update of the submodule change::
@@ -43,7 +42,7 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
4342
#. Verify that the docs build with the new versions you changed from
4443
``requirements.txt`` mainly the sphinx version::
4544

46-
make html
45+
make build
4746

4847
.. note::
4948

@@ -75,7 +74,7 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
7574

7675
.. note::
7776

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

8180
#. Now, we update our translated files form the source language (English) with new strings::
@@ -85,8 +84,8 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
8584
#. At this point, all the ``.po`` files will have a different comment on each translation phrase,
8685
for example::
8786

88-
-#: ../python-docs-es/cpython/Doc/whatsnew/3.11.rst:3
89-
+#: ../Doc/whatsnew/3.11.rst:3
87+
-#: ../python-docs-es/cpython/Doc/whatsnew/3.12.rst:3
88+
+#: ../Doc/whatsnew/3.12.rst:3
9089

9190
As you can see, it added the path of the local repository, but you can
9291
remove it from it with this regular expression::
@@ -115,10 +114,9 @@ We are currently in branch 3.10, and we want to update the strings from 3.11.
115114
of the new branch is done. So prepare a cup of any hot beverage
116115
and fix them.
117116

118-
119117
Once the process is completely and you are happy with the results,
120118
there are a few extra steps to finish the process::
121119

122-
#. Upgrade GitHub Actions to use Python 3.11
120+
#. Upgrade GitHub Actions to use Python 3.12
123121

124-
#. Update Read the Docs project to use 3.11 in the build and also as default branch/version
122+
#. Update Read the Docs project to use 3.12 in the build and also as default branch/version

TRANSLATORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Jimmy Tzuc (@JimmyTzuc)
120120
Jonathan Aguilar (@drawsoek)
121121
Jorge Luis McDonald Stevens (@jmaxter)
122122
Jorge Maldonado Ventura (@jorgesumle)
123+
José Carlos Álvarez González (@jcaalzago)
123124
José Daniel Gonzalez (@jdgc14)
124125
Jose Ignacio Riaño Chico
125126
José Luis Cantilo (@jcantilo)

about.po

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ msgstr ""
1111
"Project-Id-Version: Python 3.8\n"
1212
"Report-Msgid-Bugs-To: \n"
1313
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
14-
"PO-Revision-Date: 2019-12-22 12:23+0100\n"
15-
"Last-Translator: \n"
16-
"Language: es\n"
14+
"PO-Revision-Date: 2023-11-26 19:02+0100\n"
15+
"Last-Translator: Marcos Medrano <[email protected]>\n"
1716
"Language-Team: python-doc-es\n"
18-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"Language: es\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=utf-8\n"
2120
"Content-Transfer-Encoding: 8bit\n"
21+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2222
"Generated-By: Babel 2.10.3\n"
23+
"X-Generator: Poedit 3.4.1\n"
2324

2425
#: ../Doc/about.rst:3
2526
msgid "About these documents"
@@ -59,22 +60,20 @@ msgstr ""
5960
"herramientas de Python y escritor de gran parte del contenido;"
6061

6162
#: ../Doc/about.rst:24
62-
#, fuzzy
6363
msgid ""
6464
"the `Docutils <https://docutils.sourceforge.io/>`_ project for creating "
6565
"reStructuredText and the Docutils suite;"
6666
msgstr ""
67-
"el proyecto `Docutils <http://docutils.sourceforge.net/>`_ para creación de "
68-
"reStructuredText y el juego de Utilidades de Documentación;"
67+
"el proyecto `Docutils <https://docutils.sourceforge.io/>`_ para creación de "
68+
"reStructuredText y la suite Docutils;"
6969

7070
#: ../Doc/about.rst:26
71-
#, fuzzy
7271
msgid ""
7372
"Fredrik Lundh for his Alternative Python Reference project from which Sphinx "
7473
"got many good ideas."
7574
msgstr ""
76-
"Fredrik Lundh por su proyecto `Referencia Alternativa de Python <http://"
77-
"effbot.org/zone/pyref.htm>`_ para la cual Sphinx tuvo muchas ideas."
75+
"Fredrik Lundh por su proyecto Referencia Alternativa de Python del que "
76+
"Sphinx obtuvo muchas buenas ideas."
7877

7978
#: ../Doc/about.rst:31
8079
msgid "Contributors to the Python Documentation"

0 commit comments

Comments
 (0)