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 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/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): 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 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 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