From 3d85c3125321214299d5b90db1f706fbbda273ff Mon Sep 17 00:00:00 2001 From: Octavian Mustafa Date: Tue, 30 Sep 2025 15:23:52 +0300 Subject: [PATCH 01/30] Add Romanian translation (#272) --- .../ro/LC_MESSAGES/python-docs-theme.po | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 python_docs_theme/locale/ro/LC_MESSAGES/python-docs-theme.po diff --git a/python_docs_theme/locale/ro/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/ro/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..8694c7d --- /dev/null +++ b/python_docs_theme/locale/ro/LC_MESSAGES/python-docs-theme.po @@ -0,0 +1,130 @@ +# Romanian translations for python-docs-theme. +# Copyright (C) 2025 Python Software Foundation +# This file is distributed under the same license as the python-docs-theme +# project. +# Octavian Mustafa , 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2025.9.2\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2025-09-24 03:59+0300\n" +"PO-Revision-Date: 2025-09-24 03:59+0300\n" +"Last-Translator: Octavian Mustafa \n" +"Language: ro\n" +"Language-Team: Python Docs Romanian translation team\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100" +" < 20)) ? 1 : 2);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.17.0\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "" +"Python Software Foundation (PSF, Fundația Python dedicată " +"software-ului) este o corporație non-profit." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "Vă rugăm să donați." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "Navigație" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "Căutare rapidă" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "Execută" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "Tema" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "Automată" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "Luminoasă" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr "Întunecată" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "Meniu" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "Drepturi de autor" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License " +"Version 2." +msgstr "" +"Pagina de față este licențiată cu Versiunea 2 a Python Software Foundation " +"License (Licența fundației Python dedicată software-ului)." + +#: python_docs_theme/layout.html:149 +msgid "" +"Examples, recipes, and other code in the documentation are additionally " +"licensed under the Zero Clause BSD License." +msgstr "" +"Exemplele, rețetele și alte fragmente de cod din documentație sunt " +"licențiate suplimentar cu Zero Clause BSD License (Licența de clauză zero " +"a BSD-ului)." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"Vedeți Istoric și licență pentru mai multe " +"informații." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "Găzduit de %(hosted_on)s." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Ultima modificare în %(last_updated)s." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr "Ați găsit o greșeală?" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Creat cu Sphinx " +"%(sphinx_version)s." + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "Copiază" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "Copiat în clipboard" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "Copiat!" From 00c66995991b0e91229b051bfb515269407d53b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 08:08:36 +0900 Subject: [PATCH 02/30] Bump actions/setup-python from 5 to 6 in the actions group (#273) Bumps the actions group with 1 update: [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-python` from 5 to 6 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/pypi-package.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 795f7b0..088871c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.x" - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index bec94a2..d3a55a2 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 - name: Compile translations run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 60257ee..2b6570a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: branch: ["3.14", "3.13", "3.12"] steps: - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.branch }} allow-prereleases: true @@ -60,7 +60,7 @@ jobs: python-version: ["3.12", "3"] steps: - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true From be1571aecc6e7f73ce45be0f8a0922ee5f56f46a Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Fri, 17 Oct 2025 23:25:55 +0200 Subject: [PATCH 03/30] French translation. --- .../fr/LC_MESSAGES/python-docs-theme.po | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 python_docs_theme/locale/fr/LC_MESSAGES/python-docs-theme.po diff --git a/python_docs_theme/locale/fr/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/fr/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..77daa04 --- /dev/null +++ b/python_docs_theme/locale/fr/LC_MESSAGES/python-docs-theme.po @@ -0,0 +1,120 @@ +# Copyright (C) 2025 Python Software Foundation +# This file is distributed under the same license as the python-docs-theme +# project. +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2025.5\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2025-09-06 08:40+0100\n" +"PO-Revision-Date: 2025-10-17 23:24+0200\n" +"Last-Translator: Julien Palard \n" +"Language-Team: FRENCH \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "La Python Software Foundation est une association à but non lucratif." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "Elle vit de vos dons." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "Navigation" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "Recherche rapide" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "Rechercher" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "Thème" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "Auto" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "Clair" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr "Sombre" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "Menu" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "Copyright" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License Version 2." +msgstr "" +"La licence de cette page est la Python Software Foundation License Version 2." + +#: python_docs_theme/layout.html:149 +msgid "" +"Examples, recipes, and other code in the documentation are additionally " +"licensed under the Zero Clause BSD License." +msgstr "" +"La licence des exemples, recettes, et autres morceaux de code se trouvant " +"dans la documentation est la Zero Clause BSD License." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"Pour plus d'informations, consultez Histoire et " +"licence." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "Hébergé sur %(hosted_on)s." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Dernière mise à jour : %(last_updated)s." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr "Un bogue ?" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Crée par Sphinx " +"%(sphinx_version)s." + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "Copier" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "Copier dans le presse-papier" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "Copié !" From 89a8e838ecbda3a3a7aa91f12597196f5a33f043 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:06:42 +0100 Subject: [PATCH 04/30] Update authors in `pyproject.toml` (#271) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a614351..e054d1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ description = "The Sphinx theme for the CPython docs and related projects" readme = "README.md" license = "PSF-2.0" license-files = [ "LICENSE" ] -authors = [ { name = "PyPA", email = "distutils-sig@python.org" } ] +authors = [ { name = "Python Docs Sphinx Theme maintainers" } ] requires-python = ">=3.12" classifiers = [ "Development Status :: 5 - Production/Stable", From 2c66d17ad4211c988248c06011adaf08e3401c79 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:10:36 +0100 Subject: [PATCH 05/30] Add Arabic and Russian translations (#274) --- .../ar/LC_MESSAGES/python-docs-theme.po | 127 +++++++++++++++++ .../ru/LC_MESSAGES/python-docs-theme.po | 129 ++++++++++++++++++ 2 files changed, 256 insertions(+) create mode 100644 python_docs_theme/locale/ar/LC_MESSAGES/python-docs-theme.po create mode 100644 python_docs_theme/locale/ru/LC_MESSAGES/python-docs-theme.po diff --git a/python_docs_theme/locale/ar/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/ar/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..de6ee2f --- /dev/null +++ b/python_docs_theme/locale/ar/LC_MESSAGES/python-docs-theme.po @@ -0,0 +1,127 @@ +# Translations template for python-docs-theme. +# Copyright (C) 2025 Python Software Foundation +# This file is distributed under the same license as the python-docs-theme +# project. +# FIRST AUTHOR , 2025. +# +# Translators: +# Mostapha Mostapha, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2025.9.2\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2025-10-13 01:45+0000\n" +"PO-Revision-Date: 2025-09-06 07:41+0000\n" +"Last-Translator: Mostapha Mostapha, 2025\n" +"Language-Team: Arabic (https://app.transifex.com/python-doc/teams/5390/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.17.0\n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "مؤسسة بايثون للبرمجيات هي مؤسسة غير ربحية." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "من فضلك تبرع." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "التنقل" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "بحث سريع" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "انطلق" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "المظهر" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "ذاتي" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "الوضع الفاتح" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr "الوضع المظلم" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "القائمة" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "حقوق الطبع والنشر" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License Version " +"2." +msgstr "تُرخَّص هذه الصفحة بموجب رخصة مؤسسة بايثون للبرمجيات الإصدار 2." + +#: python_docs_theme/layout.html:149 +msgid "" +"Examples, recipes, and other code in the documentation are additionally " +"licensed under the Zero Clause BSD License." +msgstr "" +"أمثلة الكود والوصفات وغيرها في التوثيق مرخّصة أيضًا بموجب رخصة BSD الصفرية " +"(Zero Clause BSD License)." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"انظر القسم التاريخ والترخيص لمزيد من " +"المعلومات." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "مُستضاف على %(hosted_on)s." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "آخر تحديث في %(last_updated)s." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr " تم العثور على خطأ ؟" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"تم إنشاء المحتوى باستخدام Sphinx " +" %(sphinx_version)s." + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "نسخ" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "نسخ إلى الحافظة" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "تم النسخ!" diff --git a/python_docs_theme/locale/ru/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/ru/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..9a3c060 --- /dev/null +++ b/python_docs_theme/locale/ru/LC_MESSAGES/python-docs-theme.po @@ -0,0 +1,129 @@ +# Translations template for python-docs-theme. +# Copyright (C) 2025 Python Software Foundation +# This file is distributed under the same license as the python-docs-theme +# project. +# FIRST AUTHOR , 2025. +# +# Translators: +# Asdfgr Wertyu, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2025.9.2\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2025-10-13 01:45+0000\n" +"PO-Revision-Date: 2025-09-06 07:41+0000\n" +"Last-Translator: Asdfgr Wertyu, 2025\n" +"Language-Team: Russian (https://app.transifex.com/python-doc/teams/5390/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.17.0\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "Python Software Foundation — некоммерческая организация." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "Пожалуйста, сделайте пожертвование." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "Навигация" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "Быстрый поиск" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "Поиск" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "Тема" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "Авто" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "Свет" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr "Темный" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "Меню" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "Авторское право" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License Version " +"2." +msgstr "" +"Эта страница лицензирована в соответствии с лицензией Python Software " +"Foundation версии 2." + +#: python_docs_theme/layout.html:149 +msgid "" +"Examples, recipes, and other code in the documentation are additionally " +"licensed under the Zero Clause BSD License." +msgstr "" +"Примеры, рецепты и другой код в документации дополнительно лицензируются по " +"лицензии Zero Clause BSD." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"Подробнее см. в разделе История и лицензия." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "Размещено на %(hosted_on)s." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Последнее обновление %(last_updated)s." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr "Нашли ошибку?" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Создано с помощью Sphinx %(sphinx_version)s." + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "Копировать" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "Копировать в буфер обмена" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "Скопировано!" From 3d7c2b5e01aa0dbe52db19c32aa04f244c55a044 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Fri, 24 Oct 2025 16:19:31 +0100 Subject: [PATCH 06/30] Add link to devguide in README (#266) Co-authored-by: Ezio Melotti Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index fedd7f7..6d89793 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,13 @@ To use this theme, add the following to `conf.py`: - `html_sidebars`, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars + +## Translation + +This theme supports localization. For more information see the [Python Developer's +Guide](https://devguide.python.org/documentation/translations/translating/#how-do-i-translate-the-python-docs-sphinx-theme). + + ## Preview See a demo of the CPython docs using this theme: From 18811a762ada58d678a206f540e4d577ae4deca2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:47:29 +0300 Subject: [PATCH 07/30] Prepare 2025.10 release (#276) --- .github/release.yml | 4 ++-- CHANGELOG.rst | 9 +++++++++ python_docs_theme/__init__.py | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/release.yml b/.github/release.yml index 9d1e098..5f89818 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,5 +1,5 @@ changelog: exclude: authors: - - dependabot - - pre-commit-ci + - dependabot[bot] + - pre-commit-ci[bot] diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b37e2b6..9ce048d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,15 @@ Changelog ========= +`2025.10 `_ +------------------------------------------------------------------------------- + +* Add Romanian translation by @octaG-M in https://github.com/python/python-docs-theme/pull/272 +* Add Arabic and Russian translations by @StanFromIreland in https://github.com/python/python-docs-theme/pull/274 +* Add French translation by @JulienPalard in https://github.com/python/python-docs-theme/pull/275 +* Update authors in ``pyproject.toml`` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/271 +* Add link to devguide in README by @StanFromIreland in https://github.com/python/python-docs-theme/pull/266 + `2025.9.2 `_ ------------------------------------------------------------------------------- diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index 58fccd4..e5d1acf 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -11,7 +11,7 @@ from sphinx.application import Sphinx from sphinx.util.typing import ExtensionMetadata -__version__ = "2025.9.2" +__version__ = "2025.10" THEME_PATH = Path(__file__).resolve().parent LOCALE_DIR = THEME_PATH / "locale" From ae83e69a9ce370c9f7f4c27bd37ad5e6536fea76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 07:09:51 +0800 Subject: [PATCH 08/30] Bump the actions group with 2 updates (#278) Bumps the actions group with 2 updates: [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/upload-artifact](https://github.com/actions/upload-artifact). Updates `actions/download-artifact` from 5 to 6 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) Updates `actions/upload-artifact` from 4 to 5 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pypi-package.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index d3a55a2..ed0ec1d 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -48,7 +48,7 @@ jobs: steps: - name: Download packages built by build-and-inspect-python-package - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 with: name: Packages path: dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b6570a..a970872 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -45,7 +45,7 @@ jobs: run: | cat ./logs/docsbuild.log - name: Upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: doc-html-${{ matrix.branch }} path: www/ From 4e36f99d6ecc10ea7867959d3f25761a798d7afa Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 28 Nov 2025 12:38:09 +0200 Subject: [PATCH 09/30] Add support for Python 3.15 (#282) --- .github/workflows/tests.yml | 13 ++++++++----- pyproject.toml | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a970872..1cc1836 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,12 +12,15 @@ jobs: strategy: fail-fast: false matrix: - branch: ["3.14", "3.13", "3.12"] + python-version: ["3.15", "3.14", "3.13", "3.12"] + include: + - python-version: "3.15" + branch: "main" steps: - uses: actions/checkout@v5 - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.branch }} + python-version: ${{ matrix.python-version }} allow-prereleases: true cache: pip - name: Clone docsbuild scripts @@ -38,8 +41,8 @@ jobs: --skip-cache-invalidation --theme "$(pwd)" --languages en - --branches ${{ matrix.branch }} - ${{ matrix.branch == '3.14' && '--select-output no-html' || '' }} + --branches ${{ matrix.branch || matrix.python-version }} + ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} - name: Show logs if: failure() run: | @@ -47,7 +50,7 @@ jobs: - name: Upload uses: actions/upload-artifact@v5 with: - name: doc-html-${{ matrix.branch }} + name: doc-html-${{ matrix.python-version }} path: www/ translations: diff --git a/pyproject.toml b/pyproject.toml index e054d1a..b8598f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Topic :: Documentation", "Topic :: Software Development :: Documentation", ] @@ -70,4 +71,4 @@ lint.ignore = [ lint.isort.required-imports = [ "from __future__ import annotations" ] [tool.pyproject-fmt] -max_supported_python = "3.14" +max_supported_python = "3.15" From 498d07fed243b9821bf43308d18c4aa0ebeebfff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:53:23 +0800 Subject: [PATCH 10/30] Bump actions/checkout from 5 to 6 in the actions group (#284) Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/pypi-package.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 088871c..cefaff1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: "3.x" diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index ed0ec1d..3c6652b 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-python@v6 - name: Compile translations diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1cc1836..a0ce5d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: - python-version: "3.15" branch: "main" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -62,7 +62,7 @@ jobs: # Test minimum supported and latest stable from 3.x series python-version: ["3.12", "3"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} From c6ef663286ddc3bc61d6d1054e9e39d62d44f155 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:30:59 +0200 Subject: [PATCH 11/30] Convert CHANGELOG and CONTRIBUTING from .rst to .md (#277) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- CHANGELOG.rst => CHANGELOG.md | 112 +++++++++++++--------------------- CONTRIBUTING.md | 26 ++++++++ CONTRIBUTING.rst | 28 --------- 3 files changed, 67 insertions(+), 99 deletions(-) rename CHANGELOG.rst => CHANGELOG.md (58%) create mode 100644 CONTRIBUTING.md delete mode 100644 CONTRIBUTING.rst diff --git a/CHANGELOG.rst b/CHANGELOG.md similarity index 58% rename from CHANGELOG.rst rename to CHANGELOG.md index 9ce048d..3221e1b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.md @@ -1,50 +1,42 @@ -Changelog -========= +# Changelog -`2025.10 `_ -------------------------------------------------------------------------------- +## [2025.10](https://github.com/python/python-docs-theme/releases/tag/2025.10) * Add Romanian translation by @octaG-M in https://github.com/python/python-docs-theme/pull/272 * Add Arabic and Russian translations by @StanFromIreland in https://github.com/python/python-docs-theme/pull/274 * Add French translation by @JulienPalard in https://github.com/python/python-docs-theme/pull/275 -* Update authors in ``pyproject.toml`` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/271 +* Update authors in `pyproject.toml` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/271 * Add link to devguide in README by @StanFromIreland in https://github.com/python/python-docs-theme/pull/266 -`2025.9.2 `_ -------------------------------------------------------------------------------- +## [2025.9.2](https://github.com/python/python-docs-theme/releases/tag/2025.9.2) * Add Korean and Indonesian translations from Transifex in https://github.com/python/python-docs-theme/pull/264 * Add German translation by @cmaureir in https://github.com/python/python-docs-theme/pull/262 * Fix compilation of translations and loading of translations on pages with html source in https://github.com/python/python-docs-theme/pull/263 * Fix search button cutting off long translations in https://github.com/python/python-docs-theme/pull/268 -* Fix ``Copy`` button copying line numbers by @StanFromIreland in https://github.com/python/python-docs-theme/pull/270 +* Fix `Copy` button copying line numbers by @StanFromIreland in https://github.com/python/python-docs-theme/pull/270 -`2025.9.1 `_ -------------------------------------------------------------------------------- +## [2025.9.1](https://github.com/python/python-docs-theme/releases/tag/2025.9.1) * Add Japanese, Turkish and Spanish translations from Transifex in https://github.com/python/python-docs-theme/pull/259 -`2025.9 `_ ---------------------------------------------------------------------------- +## [2025.9](https://github.com/python/python-docs-theme/releases/tag/2025.9) * Enable theme translation and add Polish by @StanFromIreland in https://github.com/python/python-docs-theme/pull/246 * Add Greek translation by @lysnikolaou and @skpanagiotis in https://github.com/python/python-docs-theme/pull/256 and https://github.com/python/python-docs-theme/pull/257 * Add Swedish translation by @yeager in https://github.com/python/python-docs-theme/pull/250 -* Add Brazilian Portuguese, Simplified Chinese and Traditional Chinese translations from `Transifex `_ in https://github.com/python/python-docs-theme/pull/253 +* Add Brazilian Portuguese, Simplified Chinese and Traditional Chinese translations from [Transifex](https://explore.transifex.com/python-doc/python-docs-theme/) in https://github.com/python/python-docs-theme/pull/253 -`2025.5 `_ ---------------------------------------------------------------------------- +## [2025.5](https://github.com/python/python-docs-theme/releases/tag/2025.5) * Make the copy button only appear when hovered over or clicked on by @kevteg in https://github.com/python/python-docs-theme/pull/243 -`2025.4.1 `_ -------------------------------------------------------------------------------- +## [2025.4.1](https://github.com/python/python-docs-theme/releases/tag/2025.4.1) * Fix copy button with multiple tracebacks by @tomasr8 in https://github.com/python/python-docs-theme/pull/240 -`2025.4 `_ ---------------------------------------------------------------------------- +## [2025.4](https://github.com/python/python-docs-theme/releases/tag/2025.4) * Require Sphinx 7.3 by @AA-Turner in https://github.com/python/python-docs-theme/pull/221 * Add support for Python 3.14 by @hugovk https://github.com/python/python-docs-theme/pull/236 @@ -55,8 +47,7 @@ Changelog * Remove self-closing tags by @hugovk in https://github.com/python/python-docs-theme/pull/226 * Replace deprecated classifier with licence expression (PEP 639) by @hugovk in https://github.com/python/python-docs-theme/pull/237 -`2025.2 `_ ---------------------------------------------------------------------------- +## [2025.2](https://github.com/python/python-docs-theme/releases/tag/2025.2) - Note minimum requirements for Sphinx (#216) Contributed by Adam Turner @@ -64,17 +55,15 @@ Changelog Contributed by Tomas Roun - Make sidebar width more flexible (#218) Contributed by Tomas Roun -- Set ``__version__`` in the runtime package (#222) +- Set `__version__` in the runtime package (#222) Contributed by Adam Turner -`2024.12 `_ ------------------------------------------------------------------------------ +## [2024.12](https://github.com/python/python-docs-theme/releases/tag/2024.12) - Hide header and search bar when printing (#204) Contributed by Hugo van Kemenade -`2024.10 `_ ------------------------------------------------------------------------------ +## [2024.10](https://github.com/python/python-docs-theme/releases/tag/2024.10) - Add support for Python 3.13 (#196) Contributed by Hugo van Kemenade @@ -85,60 +74,53 @@ Changelog - Generate digital attestations for PyPI (PEP 740) (#198) Contributed by Hugo van Kemenade -`2024.6 `_ ---------------------------------------------------------------------------- +## [2024.6](https://github.com/python/python-docs-theme/releases/tag/2024.6) - Add backgrounds and borders to admonitions (#190) Contributed by Hugo van Kemenade - Use different colour for 'Return value: Borrowed reference' (#188) Contributed by Hugo van Kemenade -`2024.4 `_ ---------------------------------------------------------------------------- +## [2024.4](https://github.com/python/python-docs-theme/releases/tag/2024.4) - Add colour to version change directives (#185) Contributed by Hugo van Kemenade -- Only show 'Last updated on ...' when ``last_updated`` defined (#183) +- Only show 'Last updated on ...' when `last_updated` defined (#183) Contributed by Hugo van Kemenade - Use system font stack for all code (#186) Contributed by Hugo van Kemenade -`2024.3 `_ ---------------------------------------------------------------------------- +## [2024.3](https://github.com/python/python-docs-theme/releases/tag/2024.3) - Modernise font: use system font stack to improve text readability and webpage performance (#174) Contributed by Hugo van Kemenade - Remove incorrect CSS property (#178) Contributed by Kerim Kabirov -`2024.2 `_ ---------------------------------------------------------------------------- +## [2024.2](https://github.com/python/python-docs-theme/releases/tag/2024.2) - Do not underline navigation links (#169) Contributed by Hugo van Kemenade - Only apply underline offset to code formatting for underline visibility (#171) Contributed by Hugo van Kemenade -`2024.1 `_ ---------------------------------------------------------------------------- +## [2024.1](https://github.com/python/python-docs-theme/releases/tag/2024.1) - Underline links for readability and a11y (#160, #166) Contributed by Hugo van Kemenade -- Add ``hosted_on`` variable for a link in the footer (#165) +- Add `hosted_on` variable for a link in the footer (#165) Contributed by Hugo van Kemenade -- Consistently reference ``theme_root_icon`` (#163) +- Consistently reference `theme_root_icon` (#163) Contributed by Marko Budiselic - Dark mode: fix contrast of footer highlight (#162) Contributed by Hugo van Kemenade -`2023.9 `_ ---------------------------------------------------------------------------- +## [2023.9](https://github.com/python/python-docs-theme/releases/tag/2023.9) - Focus search box when pressing slash (#153) Contributed by Hugo van Kemenade -`2023.8 `_ ---------------------------------------------------------------------------- +## [2023.8](https://github.com/python/python-docs-theme/releases/tag/2023.8) - Add Python 3.12 and 3.13 classifiers (#147) Contributed by Hugo van Kemenade @@ -147,14 +129,13 @@ Changelog - Restore the menu on mobile devices (inadvertently broken in 2023.7) (#146) Contributed by Hugo van Kemenade -`2023.7 `_ ---------------------------------------------------------------------------- +## [2023.7](https://github.com/python/python-docs-theme/releases/tag/2023.7) - Fix compatibility with Sphinx 7.1 (#137) Contributed by Pradyun Gedam - Enable the slash keypress to focus the search field (#141) Contributed by Mike Fiedler -- Sphinx 6.2 fix: add ``nav.contents`` where ``div.topic`` is used (#138) +- Sphinx 6.2 fix: add `nav.contents` where `div.topic` is used (#138) Contributed by Hugo van Kemenade - Dark mode: fix contrast for C++ specific styling (#133) Contributed by Hugo van Kemenade @@ -163,29 +144,26 @@ Changelog - Test with Python 3.12 (#140) Contributed by Hugo van Kemenade -`2023.5 `_ ---------------------------------------------------------------------------- +## [2023.5](https://github.com/python/python-docs-theme/releases/tag/2023.5) - Add a dark theme. (#44) Contributed by Nils K - Fix: Remove searchbox id from form. (fixes #117) Contributed by Nils K -- Update ``python-docs-theme`` to work with Sphinx 5 & 6. (#99 & #127) +- Update `python-docs-theme` to work with Sphinx 5 & 6. (#99 & #127) Contributed by Adam Turner -- Override font for ``.sig`` for consistency with other code blocks. (#121) +- Override font for `.sig` for consistency with other code blocks. (#121) Contributed by Chris Warrick - Dark mode: add class to invert image brightness. (#128) Contributed by Hugo van Kemenade -`2023.3.1 `_ -------------------------------------------------------------------------------- +## [2023.3.1](https://github.com/python/python-docs-theme/releases/tag/2023.3.1) - Skip cache-busting for old Sphinx #113 -`2023.3 `_ ---------------------------------------------------------------------------- +## [2023.3](https://github.com/python/python-docs-theme/releases/tag/2023.3) - Fix problem with monospace rendering in Vivaldi #104 - Fix mobile nav obstructing content #96 @@ -193,30 +171,26 @@ Changelog - Append a hash ?digest to CSS files for cache-busting #108 -`2022.1 `_ ----------------------------------------------------------------------------- +## [2022.1](https://github.com/python/python-docs-theme/releases/tag/2022.1) - Add a configuration for license URL. (#90) - Exclude the floating navbar from CHM help. (#84) - Make sidebar scrollable and sticky (on modern browsers) (#91) -`2021.11.1 `_ ----------------------------------------------------------------------------------- +## [2021.11.1](https://github.com/python/python-docs-theme/releases/tag/2021.11.1) - Fix monospace again, on buggy Google Chrome (#87) Contributed by Tushar Sadhwani -`2021.11 `_ ------------------------------------------------------------------------------- +## [2021.11](https://github.com/python/python-docs-theme/releases/tag/2021.11) - Fix monospace on buggy Google Chrome (#85) Contributed by Tushar Sadhwani -`2021.8 `_ ------------------------------------------------------------------------------ +## [2021.8](https://github.com/python/python-docs-theme/releases/tag/2021.8) - Add the copyright_url variable in the theme (#67) Contributed by jablonskidev @@ -228,8 +202,7 @@ Changelog Contributed by Olga Bulat -`2021.5 `_ ------------------------------------------------------------------------------ +## [2021.5](https://github.com/python/python-docs-theme/releases/tag/2021.5) - Make the theme responsive (#46) Contributed by Olga Bulat. @@ -243,8 +216,7 @@ Changelog Contributed by Julien Palard. -`2020.12 `_ ------------------------------------------------------------------------------- +## [2020.12](https://github.com/python/python-docs-theme/releases/tag/v2020.12) - Updated the readme, to remind user to install the package in a virtual environment. (#41) Contributed by Mariatta. @@ -261,12 +233,10 @@ Changelog - Fixed code bgcolor and codetextcolor for Sphinx 3.1.0+ (#57) Contributed by Zhiming Wang. -2018.7 ------- -Corresponds to `44a8f30 `_ +## 2018.7 +Corresponds to [44a8f30](https://github.com/python/python-docs-theme/commit/44a8f306db9ec86d277a8a687538d5d51e415130) -`2018.2 `_ ---------------------------------------------------------------------------- +## [2018.2](https://github.com/python/python-docs-theme/releases/tag/2018.2) Initial release. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f26b902 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# How to release + +- Update `CHANGELOG.md` +- Bump version (YYYY.MM) in `python_docs_theme/__init__.py` +- Commit +- Push to check tests pass on + [GitHub Actions](https://github.com/python/python-docs-theme/actions) +- Go to https://github.com/python/python-docs-theme/releases +- Click "Draft a new release" +- Click "Choose a tag" +- Type the next YYYY.MM version (no leading zero) and + select "**Create new tag: YYYY.MM** on publish" +- Leave the "Release title" blank (it will be autofilled) +- Click "Generate release notes" and amend as required +- Click "Publish release" +- Check the tagged [GitHub Actions build](https://github.com/python/python-docs-theme/actions/workflows/pypi-package.yml) + has deployed to [PyPI](https://pypi.org/project/python-docs-theme/#history) + +# Makefile usage + +This project includes a simple Makefile for syncing changes to the theme with +the main CPython repository. Run `make help` for details on available rules. + +There is one configurable variable, `CPYTHON_PATH`, which should be the path +to the CPython repository on your machine. By default, it points to +`../cpython`. diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index c85b77c..0000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,28 +0,0 @@ -How to release --------------- - -- Update ``CHANGELOG.rst`` -- Bump version (YYYY.MM) in ``python_docs_theme/__init__.py`` -- Commit -- Push to check tests pass on - `GitHub Actions `__ -- Go to https://github.com/python/python-docs-theme/releases -- Click "Draft a new release" -- Click "Choose a tag" -- Type the next YYYY.MM version (no leading zero) and - select "**Create new tag: YYYY.MM** on publish" -- Leave the "Release title" blank (it will be autofilled) -- Click "Generate release notes" and amend as required -- Click "Publish release" -- Check the tagged `GitHub Actions build `__ - has deployed to `PyPI `__ - -Makefile usage --------------- - -This project includes a simple Makefile for syncing changes to the theme with -the main CPython repository. Run ``make help`` for details on available rules. - -There is one configurable variable, ``CPYTHON_PATH``, which should be the path -to the CPython repository on your machine. By default, it points to -``../cpython``. From 35db2d5db7d349d9249d9c8eb0f7655a8fdda3d8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:39:28 +0200 Subject: [PATCH 12/30] Add zizmor to CI and fix findings (#283) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- .github/dependabot.yml | 2 ++ .github/workflows/lint.yml | 8 +++++--- .github/workflows/pypi-package.yml | 7 +++---- .github/workflows/tests.yml | 6 ++++++ .github/zizmor.yml | 10 ++++++++++ .pre-commit-config.yaml | 5 +++++ 6 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 .github/zizmor.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8452ef0..5621e4b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,5 @@ updates: actions: patterns: - "*" + cooldown: + default-days: 7 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cefaff1..3a2f852 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,11 +2,11 @@ name: Lint on: [push, pull_request, workflow_dispatch] +permissions: {} + env: FORCE_COLOR: 1 - -permissions: - contents: read + RUFF_OUTPUT_FORMAT: github jobs: lint: @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - uses: actions/setup-python@v6 with: python-version: "3.x" diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 3c6652b..885c30b 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -8,8 +8,7 @@ on: - published workflow_dispatch: -permissions: - contents: read +permissions: {} env: FORCE_COLOR: 1 @@ -22,6 +21,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - uses: actions/setup-python@v6 - name: Compile translations @@ -55,5 +56,3 @@ jobs: - name: Upload package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - attestations: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0ce5d2..7b9875e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,8 @@ name: Tests on: [push, pull_request, workflow_dispatch] +permissions: {} + env: FORCE_COLOR: 1 @@ -18,6 +20,8 @@ jobs: branch: "main" steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -63,6 +67,8 @@ jobs: python-version: ["3.12", "3"] steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 0000000..9b42b47 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,10 @@ +# Configuration for the zizmor static analysis tool, run via pre-commit in CI +# https://woodruffw.github.io/zizmor/configuration/ +rules: + dangerous-triggers: + ignore: + - documentation-links.yml + unpinned-uses: + config: + policies: + "*": ref-pin diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a7e83b..af1d14d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,6 +32,11 @@ repos: hooks: - id: actionlint + - repo: https://github.com/woodruffw/zizmor-pre-commit + rev: v1.17.0 + hooks: + - id: zizmor + - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.5.0 hooks: From bf2c2d72a40a725cc61e26468014527b7e899d6b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:13:14 +0200 Subject: [PATCH 13/30] Add green, red and yellow side borders for code examples (#285) --- python_docs_theme/static/pydoctheme.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index d7b729f..ec2d285 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -235,6 +235,18 @@ div.body pre { border: 1px solid #ac9; } +div.body { + .good pre { + border-left: 3px solid var(--good-border); + } + .bad pre { + border-left: 3px solid var(--bad-border); + } + .maybe pre { + border-left: 3px solid var(--middle-border); + } +} + /* Admonitions */ :root { --admonition-background: #eee; From d0b901d0e8e24fd91ebde32d36a7366fbd234e6a Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Wed, 10 Dec 2025 15:17:12 +0000 Subject: [PATCH 14/30] Add Portuguese translation --- .../pt/LC_MESSAGES/python-docs-theme.po | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 python_docs_theme/locale/pt/LC_MESSAGES/python-docs-theme.po diff --git a/python_docs_theme/locale/pt/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/pt/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..27eeba6 --- /dev/null +++ b/python_docs_theme/locale/pt/LC_MESSAGES/python-docs-theme.po @@ -0,0 +1,129 @@ +# Translations template for python-docs-theme. +# Copyright (C) 2025 Python Software Foundation +# This file is distributed under the same license as the python-docs-theme +# project. +# FIRST AUTHOR , 2025. +# +# Translators: +# NyaPuma , 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2025.10\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2025-11-24 01:51+0000\n" +"PO-Revision-Date: 2025-09-06 07:41+0000\n" +"Last-Translator: NyaPuma , 2025\n" +"Language-Team: Portuguese (https://app.transifex.com/python-doc/teams/5390/pt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.17.0\n" +"Language: pt\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "A Python Software Foundation é uma corporação sem fins lucrativos." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "Por favor, faça uma doação." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "Navegação" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "Pesquisa rápida" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "Ir" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "Tema" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "Automático" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "Claro" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr "Escuro" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "Menu" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "Direitos de autor" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License Version " +"2." +msgstr "" +"Esta página está licenciada sob a Licença da Python Software Foundation " +"Versão 2." + +#: python_docs_theme/layout.html:149 +msgid "" +"Examples, recipes, and other code in the documentation are additionally " +"licensed under the Zero Clause BSD License." +msgstr "" +"Exemplos, receitas e outros códigos na documentação são licenciados " +"adicionalmente sob a licença BSD Zero Clause." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"Consulte Histórico e licença para obter " +"mais informações." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "Hospedado em %(hosted_on)s." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Última atualização em %(last_updated)s." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr "Encontrou um erro?" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Criado usando o Sphinx " +"%(sphinx_version)s." + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "Copiar" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "Copiar para a área de transferência" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "Copiado!" From 2ac4375916835bb3aa1e79c297ecc053fe3b7021 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:47:36 +0200 Subject: [PATCH 15/30] Prepare 2025.12 release (#286) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++++ python_docs_theme/__init__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3221e1b..069a114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2025.12](https://github.com/python/python-docs-theme/releases/tag/2025.12) + +* Add support for green, red and yellow side borders for code examples by @hugovk in https://github.com/python/python-docs-theme/pull/285 +* Add Portuguese translation by @NyaPuma in https://github.com/python/python-docs-theme/pull/281 +* Add support for Python 3.15 by @hugovk in https://github.com/python/python-docs-theme/pull/282 +* Convert CHANGELOG and CONTRIBUTING from .rst to .md by @hugovk in https://github.com/python/python-docs-theme/pull/277 +* Add zizmor to CI and fix findings by @hugovk in https://github.com/python/python-docs-theme/pull/283 + ## [2025.10](https://github.com/python/python-docs-theme/releases/tag/2025.10) * Add Romanian translation by @octaG-M in https://github.com/python/python-docs-theme/pull/272 diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index e5d1acf..a6c8f18 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -11,7 +11,7 @@ from sphinx.application import Sphinx from sphinx.util.typing import ExtensionMetadata -__version__ = "2025.10" +__version__ = "2025.12" THEME_PATH = Path(__file__).resolve().parent LOCALE_DIR = THEME_PATH / "locale" From f6450430f364892817a9b8d43103e8e28ed5d83f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jan 2026 06:59:54 +0100 Subject: [PATCH 16/30] Bump the actions group with 2 updates (#292) Bumps the actions group with 2 updates: [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/upload-artifact](https://github.com/actions/upload-artifact). Updates `actions/download-artifact` from 6 to 7 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v6...v7) Updates `actions/upload-artifact` from 5 to 6 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/pypi-package.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 885c30b..d3f6617 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Download packages built by build-and-inspect-python-package - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v7 with: name: Packages path: dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b9875e..b0e3dbf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,7 +52,7 @@ jobs: run: | cat ./logs/docsbuild.log - name: Upload - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: name: doc-html-${{ matrix.python-version }} path: www/ From 2162e3228e68c297cfccdd3504d06f1dbb76848d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 23:40:27 +0200 Subject: [PATCH 17/30] [pre-commit.ci] pre-commit autoupdate (#294) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .pre-commit-config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af1d14d..6ff7968 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,17 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.3 + rev: v0.14.10 hooks: - - id: ruff + - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.10.0 + rev: 25.12.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-case-conflict - id: check-merge-conflict @@ -22,28 +22,28 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.31.0 + rev: 0.36.0 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/rhysd/actionlint - rev: v1.7.7 + rev: v1.7.10 hooks: - id: actionlint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.17.0 + rev: v1.19.0 hooks: - id: zizmor - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.5.0 + rev: v2.11.1 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.23 + rev: v0.24.1 hooks: - id: validate-pyproject From acc613399f73dc4e0f4dfb739eb0899a98cc6ad2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 11 Jan 2026 18:42:54 +0200 Subject: [PATCH 18/30] Replace pre-commit with prek in CI (#293) --- .github/workflows/lint.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3a2f852..a8f03c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,4 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false - - uses: actions/setup-python@v6 - with: - python-version: "3.x" - - uses: pre-commit/action@v3.0.1 + - uses: j178/prek-action@v1 From 3434208c69c6b4744fee873c1cb5b45bb0dc6023 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Fri, 6 Feb 2026 17:22:57 +0000 Subject: [PATCH 19/30] Style codeblock `:caption:` (#288) Co-authored-by: Petr Viktorin --- python_docs_theme/static/pydoctheme.css | 19 +++++++++++++++++++ python_docs_theme/static/pydoctheme_dark.css | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index ec2d285..8c0ddfc 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -247,6 +247,25 @@ div.body { } } +div.code-block-caption { + background-color: #eee; + border: 1px solid #ac9; + border-bottom: none; + border-radius: 3px 3px 0 0; + padding: 0.3em 0.6em; + font-size: 90%; + color: #333; + + & + div pre { + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; + } + + & + div .copybutton { + border-top-right-radius: 0 !important; + } +} + /* Admonitions */ :root { --admonition-background: #eee; diff --git a/python_docs_theme/static/pydoctheme_dark.css b/python_docs_theme/static/pydoctheme_dark.css index 582e4dd..909a296 100644 --- a/python_docs_theme/static/pydoctheme_dark.css +++ b/python_docs_theme/static/pydoctheme_dark.css @@ -97,6 +97,12 @@ div.body pre { border-color: #616161; } +div.code-block-caption { + background-color: #333; + border-color: #616161; + color: white; +} + code { background-color: #424242; } From 5d1ce7b6aba2e8c9aac57795226f3c584df830b7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 27 Feb 2026 10:47:44 +0200 Subject: [PATCH 20/30] Enable copy button for shell sessions and consoles (#295) --- python_docs_theme/static/copybutton.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python_docs_theme/static/copybutton.js b/python_docs_theme/static/copybutton.js index e1ad458..f90eb1e 100644 --- a/python_docs_theme/static/copybutton.js +++ b/python_docs_theme/static/copybutton.js @@ -62,6 +62,12 @@ const loadCopyButton = () => { + ".highlight-python3 .highlight," + ".highlight-pycon .highlight," + ".highlight-pycon3 .highlight," + + ".highlight-bash .highlight," + + ".highlight-console .highlight," + + ".highlight-doscon .highlight," + + ".highlight-ps1con .highlight," + + ".highlight-sh .highlight," + + ".highlight-shell-session .highlight," + ".highlight-default .highlight" ) From d075da5fe4aa2c2aa28f8ef9e3065fe440fcab28 Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Fri, 27 Feb 2026 15:30:34 +0100 Subject: [PATCH 21/30] Add colors for thread safety annotations (#297) --- python_docs_theme/static/pydoctheme.css | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 8c0ddfc..a83030a 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -444,6 +444,26 @@ div.footer a:hover { color: #229; } +/* C API thread safety annotations */ +:root { + --threadsafety-incompatible: var(--bad-color); + --threadsafety-compatible: var(--middle-color); + --threadsafety-safe: var(--good-color); +} + +.threadsafety.threadsafety-incompatible { + color: var(--threadsafety-incompatible); +} + +.threadsafety.threadsafety-compatible { + color: var(--threadsafety-compatible); +} + +.threadsafety.threadsafety-safe { + color: var(--threadsafety-safe); +} + + dl > dt span ~ em, .sig { font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; From 6aea65762f1e1ee339cf96b837377a5f917338b3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 27 Feb 2026 16:57:38 +0200 Subject: [PATCH 22/30] Prepare 2026.2 release (#298) --- CHANGELOG.md | 6 ++++++ CONTRIBUTING.md | 5 +++-- python_docs_theme/__init__.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 069a114..0c28c8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [2026.2](https://github.com/python/python-docs-theme/releases/tag/2026.2) + +* Style codeblock `:caption:` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/288 +* Enable copy button for shell sessions and consoles by @hugovk in https://github.com/python/python-docs-theme/pull/295 +* Add colors for thread safety annotations by @lysnikolaou in https://github.com/python/python-docs-theme/pull/297 + ## [2025.12](https://github.com/python/python-docs-theme/releases/tag/2025.12) * Add support for green, red and yellow side borders for code examples by @hugovk in https://github.com/python/python-docs-theme/pull/285 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f26b902..4ca0f05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,9 +7,10 @@ [GitHub Actions](https://github.com/python/python-docs-theme/actions) - Go to https://github.com/python/python-docs-theme/releases - Click "Draft a new release" -- Click "Choose a tag" +- Click "Tag: Select tag" - Type the next YYYY.MM version (no leading zero) and - select "**Create new tag: YYYY.MM** on publish" + select "Create new tag" +- Click "Create" for "YYYY.MM will be created on publish" - Leave the "Release title" blank (it will be autofilled) - Click "Generate release notes" and amend as required - Click "Publish release" diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index a6c8f18..026329b 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -11,7 +11,7 @@ from sphinx.application import Sphinx from sphinx.util.typing import ExtensionMetadata -__version__ = "2025.12" +__version__ = "2026.2" THEME_PATH = Path(__file__).resolve().parent LOCALE_DIR = THEME_PATH / "locale" From 6f83c8d47504e0cd79be5f27607622e8c63c97ce Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Thu, 12 Mar 2026 14:37:24 +0100 Subject: [PATCH 23/30] Add colors for new thread-safety levels (#299) --- python_docs_theme/static/pydoctheme.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index a83030a..7167add 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -448,7 +448,9 @@ div.footer a:hover { :root { --threadsafety-incompatible: var(--bad-color); --threadsafety-compatible: var(--middle-color); - --threadsafety-safe: var(--good-color); + --threadsafety-distinct: var(--middle-color); + --threadsafety-shared: var(--good-color); + --threadsafety-atomic: var(--good-color); } .threadsafety.threadsafety-incompatible { @@ -459,8 +461,16 @@ div.footer a:hover { color: var(--threadsafety-compatible); } -.threadsafety.threadsafety-safe { - color: var(--threadsafety-safe); +.threadsafety.threadsafety-distinct { + color: var(--threadsafety-distinct); +} + +.threadsafety.threadsafety-shared { + color: var(--threadsafety-shared); +} + +.threadsafety.threadsafety-atomic { + color: var(--threadsafety-atomic); } From d71bc5c6f7a055719feeb629df1a7a6c39dd4c23 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 12 Mar 2026 15:46:13 +0200 Subject: [PATCH 24/30] Prepare 2026.3 release (#300) --- CHANGELOG.md | 4 ++++ python_docs_theme/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c28c8f..8c34acb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [2026.3](https://github.com/python/python-docs-theme/releases/tag/2026.3) + +* Add colors for new thread-safety levels by @lysnikolaou in https://github.com/python/python-docs-theme/pull/299 + ## [2026.2](https://github.com/python/python-docs-theme/releases/tag/2026.2) * Style codeblock `:caption:` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/288 diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index 026329b..e92b751 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -11,7 +11,7 @@ from sphinx.application import Sphinx from sphinx.util.typing import ExtensionMetadata -__version__ = "2026.2" +__version__ = "2026.3" THEME_PATH = Path(__file__).resolve().parent LOCALE_DIR = THEME_PATH / "locale" From 4047502dd7e7c49cb064fc11869e38f81bedf0fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 11:32:15 +0800 Subject: [PATCH 25/30] Bump the actions group with 3 updates (#301) Bumps the actions group with 3 updates: [j178/prek-action](https://github.com/j178/prek-action), [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/upload-artifact](https://github.com/actions/upload-artifact). Updates `j178/prek-action` from 1 to 2 - [Release notes](https://github.com/j178/prek-action/releases) - [Commits](https://github.com/j178/prek-action/compare/v1...v2) Updates `actions/download-artifact` from 7 to 8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v7...v8) Updates `actions/upload-artifact` from 6 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: j178/prek-action dependency-version: '2' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- .github/workflows/pypi-package.yml | 2 +- .github/workflows/tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a8f03c1..2c301a8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,4 +16,4 @@ jobs: - uses: actions/checkout@v6 with: persist-credentials: false - - uses: j178/prek-action@v1 + - uses: j178/prek-action@v2 diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index d3f6617..2734399 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Download packages built by build-and-inspect-python-package - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: Packages path: dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0e3dbf..6a10a67 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,7 +52,7 @@ jobs: run: | cat ./logs/docsbuild.log - name: Upload - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: doc-html-${{ matrix.python-version }} path: www/ From 0672ed43041f46ab116b3f047b38084c123efad9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 10:23:01 +0300 Subject: [PATCH 26/30] [pre-commit.ci] pre-commit autoupdate (#302) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .pre-commit-config.yaml | 16 ++++++++-------- pyproject.toml | 13 ++++--------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ff7968..eb895c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.9 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black @@ -22,28 +22,28 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.36.0 + rev: 0.37.1 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/rhysd/actionlint - rev: v1.7.10 + rev: v1.7.12 hooks: - id: actionlint - - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.19.0 + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.23.1 hooks: - id: zizmor - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.11.1 + rev: v2.21.0 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.24.1 + rev: v0.25 hooks: - id: validate-pyproject diff --git a/pyproject.toml b/pyproject.toml index b8598f5..ef39594 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,26 +27,21 @@ classifiers = [ "Topic :: Software Development :: Documentation", ] dynamic = [ "version" ] - dependencies = [ "sphinx>=7.3", ] - +urls."Issue tracker" = "https://github.com/python/python-docs-theme/issues" urls.Code = "https://github.com/python/python-docs-theme" urls.Download = "https://pypi.org/project/python-docs-theme/" urls.Homepage = "https://github.com/python/python-docs-theme/" -urls."Issue tracker" = "https://github.com/python/python-docs-theme/issues" entry-points."sphinx.html_themes".python_docs_theme = "python_docs_theme" -[tool.flit.module] -name = "python_docs_theme" - -[tool.flit.sdist] -include = [ "python_docs_theme/" ] +[tool.flit] +module.name = "python_docs_theme" +sdist.include = [ "python_docs_theme/" ] [tool.ruff] fix = true - lint.select = [ "C4", # flake8-comprehensions "E", # pycodestyle errors From 9146048bfe40dbb4224ea159bb548909d3332b32 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Tue, 14 Apr 2026 11:03:12 +0100 Subject: [PATCH 27/30] Set line-height on field-list term Align text within field-list `dt` tags with the `p` tags within the corresponding `dd` tags. --- python_docs_theme/static/pydoctheme.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 7167add..d866c34 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -223,6 +223,9 @@ div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { border: 0; padding: 0.3em 0; } +div.body dl.field-list > dt { + line-height: 1.6; +} div.body hr { border: 0; From 3cb59ffb3541938b8dabeb5f33b65031f26a8198 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Tue, 14 Apr 2026 14:13:32 +0100 Subject: [PATCH 28/30] Add Tamil translation (#304) --- .../ta/LC_MESSAGES/python-docs-theme.po | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 python_docs_theme/locale/ta/LC_MESSAGES/python-docs-theme.po diff --git a/python_docs_theme/locale/ta/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/ta/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..f309d5c --- /dev/null +++ b/python_docs_theme/locale/ta/LC_MESSAGES/python-docs-theme.po @@ -0,0 +1,129 @@ +# Translations template for python-docs-theme. +# Copyright (C) 2026 Python Software Foundation +# This file is distributed under the same license as the python-docs-theme +# project. +# FIRST AUTHOR , 2026. +# +# Translators: +# Murugan Santhosh, 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2026.3\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2026-04-06 02:43+0000\n" +"PO-Revision-Date: 2025-09-06 07:41+0000\n" +"Last-Translator: Murugan Santhosh, 2026\n" +"Language-Team: Tamil (https://app.transifex.com/python-doc/teams/5390/ta/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.18.0\n" +"Language: ta\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "Python Software Foundation ஒரு இலாப நோக்கம் இல்லாத நிறுவனமாகும்." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "தயவுசெய்து நன்கொடை அளியுங்கள்." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "வழிநடத்தல்" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "விரைவுத் தேடல்" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "செல்" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "தோற்றம்" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "தானியங்கி" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "வெளிச்சமாக" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr "இருண்டதாக" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "Menu" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "காப்புரிமை" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License Version " +"2." +msgstr "" +"இந்தப் பக்கம் Python Software Foundation Licence, பதிப்பு 2-இன் கீழ் உரிமம் " +"பெற்றது." + +#: python_docs_theme/layout.html:149 +msgid "" +"Examples, recipes, and other code in the documentation are additionally " +"licensed under the Zero Clause BSD License." +msgstr "" +"ஆவணங்களில் உள்ள எடுத்துக்காட்டுகள், செய்முறைகள் மற்றும் பிற குறியீடுகள் " +"கூடுதலாக Zero Clause BSD Licence-இன் கீழ் உரிமம் பெறப்பட்டுள்ளன." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"மேலும் தகவல்களுக்கு வரலாறு மற்றும் " +"உரிமத்தைப் பார்க்கவும்." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "%(hosted_on)s-இல் வழங்கப்படுகிறது." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "கடைசியாகப் புதுப்பிக்கப்பட்டது %(last_updated)s அன்று." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr "பிழையை கண்டீர்களா?" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Sphinx பயன்படுத்தி " +"உருவாக்கப்பட்டது %(sphinx_version)s." + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "Copy" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "Copy to clipboard" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "Copied!" From b8841091aa256498c6f6dffd1fd6d468c013b648 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 19 Apr 2026 14:17:58 +0100 Subject: [PATCH 29/30] Add styling for `soft-deprecated` class (#305) --- python_docs_theme/static/pydoctheme.css | 10 ++++++++++ python_docs_theme/static/pydoctheme_dark.css | 2 ++ 2 files changed, 12 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index d866c34..aa9622d 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -789,10 +789,12 @@ div.genindex-jumpbox a { --versionadded: var(--good-color); --versionchanged: var(--middle-color); --deprecated: var(--bad-color); + --soft-deprecated: rgb(175, 0, 255); --versionadded-border: var(--good-border); --versionchanged-border: var(--middle-border); --deprecated-border: var(--bad-border); + --soft-deprecated-border: rgb(175, 0, 255); } div.versionadded, @@ -817,6 +819,10 @@ div.versionremoved { border-left-color: var(--deprecated-border); } +div.soft-deprecated { + border-left-color: var(--soft-deprecated-border); +} + div.versionadded .versionmodified { color: var(--versionadded); } @@ -831,6 +837,10 @@ div.versionremoved .versionmodified { color: var(--deprecated); } +div.soft-deprecated .versionmodified { + color: var(--soft-deprecated); +} + /* Hide header when printing */ @media print { div.mobile-nav { diff --git a/python_docs_theme/static/pydoctheme_dark.css b/python_docs_theme/static/pydoctheme_dark.css index 909a296..df91a2a 100644 --- a/python_docs_theme/static/pydoctheme_dark.css +++ b/python_docs_theme/static/pydoctheme_dark.css @@ -181,6 +181,8 @@ img.invert-in-dark-mode { --versionadded: var(--good-color); --versionchanged: var(--middle-color); --deprecated: var(--bad-color); + --soft-deprecated: rgb(206, 100, 255); + --soft-deprecated-border: rgb(206, 100, 255); } .copybutton { From 6da68a738f3358fa85edc2d769a1a6adf8d5b860 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 19 Apr 2026 19:27:25 +0100 Subject: [PATCH 30/30] Prepare 2026.4 release (#306) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++++ python_docs_theme/__init__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c34acb..35e50ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2026.4](https://github.com/python/python-docs-theme/releases/tag/2026.4) + +* Add styling for the `soft-deprecated` class by @StanFromIreland + in https://github.com/python/python-docs-theme/pull/305 +* Add Tamil translation in https://github.com/python/python-docs-theme/pull/304 +* Fix the vertical alignment of `:Editor:` by @pradyunsg in + https://github.com/python/python-docs-theme/pull/303 + ## [2026.3](https://github.com/python/python-docs-theme/releases/tag/2026.3) * Add colors for new thread-safety levels by @lysnikolaou in https://github.com/python/python-docs-theme/pull/299 diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index e92b751..6708b6d 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -11,7 +11,7 @@ from sphinx.application import Sphinx from sphinx.util.typing import ExtensionMetadata -__version__ = "2026.3" +__version__ = "2026.4" THEME_PATH = Path(__file__).resolve().parent LOCALE_DIR = THEME_PATH / "locale"