From 8920d7423144d44eefc4610d4df2d6c6b33e470f Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Mon, 27 Oct 2025 11:02:52 +0800 Subject: [PATCH 1/5] =?UTF-8?q?Publica=20la=20documentaci=C3=B3n=20constru?= =?UTF-8?q?ida=20como=20un=20artefact?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rodrigo Tobar --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18016efc2c..8b3427d1db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,3 +92,9 @@ jobs: - name: Construir documentación run: | sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html + + # Publica la documentación recién construida para poder descargarla de ser necesario + - uses: actions/upload-artifact@v4 + with: + path: cpython/Doc/_build/html + name: documentación-html From 9a916cfc547faf531069b90474e2ca6f62b8a588 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Mon, 27 Oct 2025 11:52:08 +0800 Subject: [PATCH 2/5] Actualiza potodo a 0.30 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Esta última versión emite una advertencia al usar -p/--path, que ya no es necesario. Esto causa dos problemas: * Esta advertencia contiene un emoji, el cual no era bien entendido por sphinx-autorun en su configuración por defecto. * Al imprimirse en stderr, previene a que el output de stdout de potodo sea imprimido por sphinx-autorun. Con este commit se actualiza la versión de potodo a 0.30, con lo cual se evita la advertencia y los dos problemas asociados a ella. Signed-off-by: Rodrigo Tobar --- .overrides/progress.rst | 2 +- requirements-own.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.overrides/progress.rst b/.overrides/progress.rst index 7fead69417..1a6e7284cf 100644 --- a/.overrides/progress.rst +++ b/.overrides/progress.rst @@ -20,7 +20,7 @@ Muestra los porcentajes completados por directorio y solo los archivos que no es .. runblock:: console - $ potodo --path . + $ potodo . Completados diff --git a/requirements-own.txt b/requirements-own.txt index 5f2e1c075a..cac697fa5b 100644 --- a/requirements-own.txt +++ b/requirements-own.txt @@ -2,7 +2,7 @@ pip polib pospell>=1.1 -potodo +potodo>=0.30 powrap>=1.0.2 pre-commit Pygments>=2.17.0 From be65505cd05aa444759b6d4132fbea19cf2a7068 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Mon, 20 Oct 2025 12:26:56 +0800 Subject: [PATCH 3/5] =?UTF-8?q?Arregla=20problemas=20de=20ortograf=C3=ADa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Por alguna razón estos errores han pasado desapercibidos hasta el momento. Signed-off-by: Rodrigo Tobar --- dictionaries/library_io.txt | 1 + dictionaries/whatsnew_2.7.txt | 1 + reference/compound_stmts.po | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dictionaries/library_io.txt b/dictionaries/library_io.txt index 0a93b4a395..9da6128ac4 100644 --- a/dictionaries/library_io.txt +++ b/dictionaries/library_io.txt @@ -8,3 +8,4 @@ Reconfigura similarmente subclasifica subclasificaciones +Markdown diff --git a/dictionaries/whatsnew_2.7.txt b/dictionaries/whatsnew_2.7.txt index dab9202ed2..87a2cf05a6 100644 --- a/dictionaries/whatsnew_2.7.txt +++ b/dictionaries/whatsnew_2.7.txt @@ -103,3 +103,4 @@ values viewkeys warnings whatever +Light diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 483661f484..5a06c0ed61 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -336,7 +336,7 @@ msgstr "" "Para una cláusula de :keyword:`!except`con una expresión, la expresión debe " "evaluar a un tipo de excepción o un tupla de tipos de excepciones. La " "excepción generada coincide con una cláusula :keyword:`!except` cuya " -"expresión evaluá a la clase o una :term:`clase base no virtual ` del objeto excepción, o una tupla que contiene dicha clase." #: ../Doc/reference/compound_stmts.rst:255 From 2b0527905f5c851ff700f4a615065cef83a172d0 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Mon, 20 Oct 2025 12:32:03 +0800 Subject: [PATCH 4/5] =?UTF-8?q?Agrega=20peque=C3=B1as=20mejores=20a=20chec?= =?UTF-8?q?k=5Fspell.po?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Imprime mapeo de archivos sólo si hay errores * Path.glob() produce un map en vez de una lista. Este map se consume en el primer loop (al crear los archivos temporales), después del cual no se pueden consumir más elementos. Esto quiere decir que, en caso de haber fallos de ortografía, el último for que imprime el mapeo entre archivos no imprimía nada, dado que el objecto map ya no entregaba resultados. * Usa shutil para copiar de un archivo a otro. Signed-off-by: Rodrigo Tobar --- scripts/check_spell.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/check_spell.py b/scripts/check_spell.py index d915d23849..da8738366e 100644 --- a/scripts/check_spell.py +++ b/scripts/check_spell.py @@ -4,6 +4,7 @@ """ from pathlib import Path +import shutil import sys import tempfile @@ -43,7 +44,7 @@ def check_spell(po_files=None): # Run pospell either against all files or the file given on the command line if not po_files: - po_files = Path(".").glob("*/*.po") + po_files = list(Path(".").glob("*/*.po")) # Workaround issue #3324 FIXME # It seems that all code snippets have line breaks '\n'. This causes the @@ -52,10 +53,9 @@ def check_spell(po_files=None): # Create temporary copies of the original files. po_files_tmp = [] for po_file in po_files: - with open(tempfile.mktemp(), "w") as temp_file: - # Copy content of the .po file - with open(po_file, "r", encoding="utf-8") as f: - temp_file.write(f.read()) + with open(tempfile.mktemp(), "wb") as temp_file: + with open(po_file, "rb") as original_file: + shutil.copyfileobj(original_file, temp_file) po_files_tmp.append(temp_file.name) # Don't translate probably code entries @@ -66,8 +66,9 @@ def check_spell(po_files=None): polib_temp_file.save() detected_errors = pospell.spell_check(po_files_tmp, personal_dict=output_filename, language="es_ES") - for tmp, orig in zip(po_files_tmp, po_files): - print(tmp, " == ", orig) + if detected_errors: + for tmp, orig in zip(po_files_tmp, po_files): + print(tmp, " == ", orig) return detected_errors From 88b9e1aa9a73c196cffb17998482127b30ceea88 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Mon, 27 Oct 2025 10:56:06 +0800 Subject: [PATCH 5/5] Usa utf-8 para tratar output en autorun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Las herramientas que usamos emiten caracteres que no están en ascii, que es el encoding por defecto que autorun usa. Signed-off-by: Rodrigo Tobar --- conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conf.py b/conf.py index a267d02a07..59aacc661f 100644 --- a/conf.py +++ b/conf.py @@ -90,6 +90,14 @@ ] +# autorun is used, among other things, to run potodo, which generates non-ascii output +# starting with 0.30. autorun OTOH defaults to use ascii to decode console/python output. +# Let's switch to utf-8 instead. +autorun_languages = { + "console_output_encoding": "utf-8", + "pycon_output_encoding": "utf-8", +} + def setup(app): def add_contributing_banner(app, doctree):