From 08551016991fe9ecc1f54fface57fa910fde1734 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 24 Apr 2026 18:02:12 +0300 Subject: [PATCH 01/10] Hash pin GitHub Actions (#307) Co-authored-by: Stan Ulbrych --- .github/workflows/documentation-links.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/pypi-package.yml | 10 +++++----- .github/workflows/tests.yml | 10 +++++----- .github/zizmor.yml | 8 ++------ 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/documentation-links.yml b/.github/workflows/documentation-links.yml index a4de7dc..2c68275 100644 --- a/.github/workflows/documentation-links.yml +++ b/.github/workflows/documentation-links.yml @@ -18,7 +18,7 @@ jobs: documentation-links: runs-on: ubuntu-latest steps: - - uses: readthedocs/actions/preview@v1 + - uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5 with: project-slug: "python-docs-theme-previews" single-version: "true" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2c301a8..eb37549 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - uses: j178/prek-action@v2 + - uses: j178/prek-action@cbc2f23eb5539cf20d82d1aabd0d0ecbcc56f4e3 # v2.0.2 diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 2734399..306af50 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -20,10 +20,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - uses: actions/setup-python@v6 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - name: Compile translations run: | @@ -31,7 +31,7 @@ jobs: pip install -r requirements.txt python babel_runner.py compile - - uses: hynek/build-and-inspect-python-package@v2 + - uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0 # Upload to real PyPI on GitHub Releases. release-pypi: @@ -49,10 +49,10 @@ jobs: steps: - name: Download packages built by build-and-inspect-python-package - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: Packages path: dist - name: Upload package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a10a67..fdd840d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,10 +19,10 @@ jobs: - python-version: "3.15" branch: "main" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - uses: actions/setup-python@v6 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -52,7 +52,7 @@ jobs: run: | cat ./logs/docsbuild.log - name: Upload - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: doc-html-${{ matrix.python-version }} path: www/ @@ -66,10 +66,10 @@ jobs: # Test minimum supported and latest stable from 3.x series python-version: ["3.12", "3"] steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - uses: actions/setup-python@v6 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/.github/zizmor.yml b/.github/zizmor.yml index 9b42b47..7c776d5 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -1,10 +1,6 @@ -# Configuration for the zizmor static analysis tool, run via pre-commit in CI -# https://woodruffw.github.io/zizmor/configuration/ +# Configuration for the zizmor static analysis tool, run via prek in CI +# https://docs.zizmor.sh/configuration/ rules: dangerous-triggers: ignore: - documentation-links.yml - unpinned-uses: - config: - policies: - "*": ref-pin From a4e8bb2db38b6d8dbde2ca7c333f2528a4b8f875 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 28 Apr 2026 20:46:09 +0300 Subject: [PATCH 02/10] Replace deprecated action with RtD app (#308) --- .github/workflows/documentation-links.yml | 24 ----------------------- 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/documentation-links.yml diff --git a/.github/workflows/documentation-links.yml b/.github/workflows/documentation-links.yml deleted file mode 100644 index 2c68275..0000000 --- a/.github/workflows/documentation-links.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Read the Docs PR preview -# Automatically edits a pull request's descriptions with a link -# to the documentation's preview on Read the Docs. - -on: - pull_request_target: - types: - - opened - -permissions: - pull-requests: write - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - documentation-links: - runs-on: ubuntu-latest - steps: - - uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5 - with: - project-slug: "python-docs-theme-previews" - single-version: "true" From f0701367eccb36ecc8d91a7ff7e1a7d0d96caebe Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Mon, 11 May 2026 16:19:32 +0100 Subject: [PATCH 03/10] Add Vietnamese translation (#309) --- .../vi/LC_MESSAGES/python-docs-theme.po | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 python_docs_theme/locale/vi/LC_MESSAGES/python-docs-theme.po diff --git a/python_docs_theme/locale/vi/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/vi/LC_MESSAGES/python-docs-theme.po new file mode 100644 index 0000000..5e30147 --- /dev/null +++ b/python_docs_theme/locale/vi/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: +# Nguyen Duc Tam, 2026 +# +msgid "" +msgstr "" +"Project-Id-Version: python-docs-theme 2026.4\n" +"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n" +"POT-Creation-Date: 2026-04-27 03:20+0000\n" +"PO-Revision-Date: 2025-09-06 07:41+0000\n" +"Last-Translator: Nguyen Duc Tam, 2026\n" +"Language-Team: Vietnamese (https://app.transifex.com/python-doc/teams/5390/vi/)\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: vi\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: python_docs_theme/footerdonate.html:1 +msgid "The Python Software Foundation is a non-profit corporation." +msgstr "Python Software Foundation là một tổ chức phi lợi nhuận." + +#: python_docs_theme/footerdonate.html:2 +msgid "Please donate." +msgstr "Vui lòng quyên góp." + +#: python_docs_theme/layout.html:6 +msgid "Navigation" +msgstr "Điều hướng" + +#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111 +msgid "Quick search" +msgstr "Tìm kiếm nhanh" + +#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112 +msgid "Go" +msgstr "Đi tiếp" + +#: python_docs_theme/layout.html:60 +msgid "Theme" +msgstr "Theme" + +#: python_docs_theme/layout.html:62 +msgid "Auto" +msgstr "Tự động" + +#: python_docs_theme/layout.html:63 +msgid "Light" +msgstr "Sáng" + +#: python_docs_theme/layout.html:64 +msgid "Dark" +msgstr " Tối" + +#: python_docs_theme/layout.html:96 +msgid "Menu" +msgstr "Menu" + +#: python_docs_theme/layout.html:142 +msgid "Copyright" +msgstr "Bản quyền" + +#: python_docs_theme/layout.html:147 +msgid "" +"This page is licensed under the Python Software Foundation License Version " +"2." +msgstr "" +"Trang này được cấp phép theo Giấy phép của Tổ chức Phần mềm Python Phiên bản" +" 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 "" +"Các ví dụ, hướng dẫn và mã nguồn khác trong tài liệu này còn được cấp phép " +"bổ sung theo Giấy phép BSD Không Điều khoản." + +#: python_docs_theme/layout.html:152 +#, python-format +msgid "" +"See History and License for more " +"information." +msgstr "" +"Xem Lịch sử và Giấy phép để biết thêm thông" +" tin." + +#: python_docs_theme/layout.html:155 +#, python-format +msgid "Hosted on %(hosted_on)s." +msgstr "Được lưu trữ trên %(hosted_on)s." + +#: python_docs_theme/layout.html:163 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Cập nhật lần cuối vào %(last_updated)s." + +#: python_docs_theme/layout.html:166 +#, python-format +msgid "Found a bug?" +msgstr "Tìm thấy lỗi?" + +#: python_docs_theme/layout.html:170 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Được tạo bằng Sphinx " +"%(sphinx_version)s. " + +#: python_docs_theme/static/copybutton.js:30 +#: python_docs_theme/static/copybutton.js:55 +msgid "Copy" +msgstr "Sao chép" + +#: python_docs_theme/static/copybutton.js:31 +msgid "Copy to clipboard" +msgstr "Sao chép vào clipboard" + +#: python_docs_theme/static/copybutton.js:53 +msgid "Copied!" +msgstr "Đã sao chép!" From fb2d99618c0d625a5de3cdce3fd54fae147bc47c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 15:54:08 +0100 Subject: [PATCH 04/10] Bump the actions group with 2 updates (#313) Bumps the actions group with 2 updates: [j178/prek-action](https://github.com/j178/prek-action) and [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package). Updates `j178/prek-action` from 2.0.2 to 2.0.4 - [Release notes](https://github.com/j178/prek-action/releases) - [Commits](https://github.com/j178/prek-action/compare/cbc2f23eb5539cf20d82d1aabd0d0ecbcc56f4e3...bdca6f102f98e2b4c7029491a53dfd366469e33d) Updates `hynek/build-and-inspect-python-package` from 2.17.0 to 2.18.0 - [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases) - [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md) - [Commits](https://github.com/hynek/build-and-inspect-python-package/compare/fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e...d44ca7d91762de7a7d5436ddae667c6da6d1c3df) --- updated-dependencies: - dependency-name: j178/prek-action dependency-version: 2.0.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: hynek/build-and-inspect-python-package dependency-version: 2.18.0 dependency-type: direct:production update-type: version-update:semver-minor 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 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eb37549..9fd628a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,4 +16,4 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - - uses: j178/prek-action@cbc2f23eb5539cf20d82d1aabd0d0ecbcc56f4e3 # v2.0.2 + - uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 306af50..12d5303 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -31,7 +31,7 @@ jobs: pip install -r requirements.txt python babel_runner.py compile - - uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0 + - uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0 # Upload to real PyPI on GitHub Releases. release-pypi: From 040f37cb448266dd2a60ae8cf839152b4a7b2f0b Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Thu, 4 Jun 2026 12:45:58 +0100 Subject: [PATCH 05/10] Switch to Hatchling build hooks for i18n packaging (#312) This also excludes PO files from wheels. --- .github/workflows/pypi-package.yml | 6 ------ babel_runner.py | 7 +++++++ pyproject.toml | 14 +++++++++----- .../locale/de/LC_MESSAGES/python-docs-theme.po | 1 - requirements.txt | 1 + 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index 12d5303..d14da70 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -25,12 +25,6 @@ jobs: persist-credentials: false - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - - name: Compile translations - run: | - pip install --upgrade pip - pip install -r requirements.txt - python babel_runner.py compile - - uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0 # Upload to real PyPI on GitHub Releases. diff --git a/babel_runner.py b/babel_runner.py index 677f6da..f4c8122 100755 --- a/babel_runner.py +++ b/babel_runner.py @@ -8,6 +8,8 @@ import tomllib from pathlib import Path +from hatchling.builders.hooks.plugin.interface import BuildHookInterface + # Global variables used by pybabel below (paths relative to PROJECT_DIR) DOMAIN = "python-docs-theme" COPYRIGHT_HOLDER = "Python Software Foundation" @@ -106,6 +108,11 @@ def compile_catalogs(locale: str) -> None: subprocess.run(cmd, cwd=PROJECT_DIR, check=True) +class CustomBuildHook(BuildHookInterface): + def initialize(self, version: str, build_data: dict[str, object]) -> None: + compile_catalogs("") + + def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( diff --git a/pyproject.toml b/pyproject.toml index ef39594..897ff85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,8 @@ [build-system] -build-backend = "flit_core.buildapi" +build-backend = "hatchling.build" requires = [ - "flit-core>=3.7", + "babel", + "hatchling", ] [project] @@ -36,9 +37,12 @@ urls.Download = "https://pypi.org/project/python-docs-theme/" urls.Homepage = "https://github.com/python/python-docs-theme/" entry-points."sphinx.html_themes".python_docs_theme = "python_docs_theme" -[tool.flit] -module.name = "python_docs_theme" -sdist.include = [ "python_docs_theme/" ] +[tool.hatch] +build.artifacts = [ "python_docs_theme/locale/**/*.mo" ] +build.hooks.custom.path = "babel_runner.py" +build.targets.wheel.packages = [ "python_docs_theme" ] +build.targets.wheel.exclude = [ "python_docs_theme/locale/**/*.po" ] +version.path = "python_docs_theme/__init__.py" [tool.ruff] fix = true diff --git a/python_docs_theme/locale/de/LC_MESSAGES/python-docs-theme.po b/python_docs_theme/locale/de/LC_MESSAGES/python-docs-theme.po index 49dddf7..7ec069d 100644 --- a/python_docs_theme/locale/de/LC_MESSAGES/python-docs-theme.po +++ b/python_docs_theme/locale/de/LC_MESSAGES/python-docs-theme.po @@ -7,7 +7,6 @@ # Translators: # Cristián Maureira-Fredes, 2025 # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: python-docs-theme 2025.5\n" diff --git a/requirements.txt b/requirements.txt index bb631b5..ea5adbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ # for babel_runner.py Babel +hatchling Jinja2 From 4ac681052ebd2c565a4a1ffdad905b9cfb97468c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 04:41:59 +0200 Subject: [PATCH 06/10] Bump the actions group with 2 updates (#315) Bumps the actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/checkout` from 6.0.2 to 7.0.0 - [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/de0fac2e4500dabe0009e67214ff5f5447ce83dd...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0) Updates `actions/setup-python` from 6.2.0 to 6.3.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/a309ff8b426b58ec0e2a45f0f869d46889d02405...ece7cb06caefa5fff74198d8649806c4678c61a1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor 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 | 4 ++-- .github/workflows/tests.yml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9fd628a..fdeb038 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 diff --git a/.github/workflows/pypi-package.yml b/.github/workflows/pypi-package.yml index d14da70..c1d86b9 100644 --- a/.github/workflows/pypi-package.yml +++ b/.github/workflows/pypi-package.yml @@ -20,10 +20,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 - uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fdd840d..58a53f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,10 +19,10 @@ jobs: - python-version: "3.15" branch: "main" steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -66,10 +66,10 @@ jobs: # Test minimum supported and latest stable from 3.x series python-version: ["3.12", "3"] steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true From 8e9ae96a667443d50081ca067b0cdeda91d601c9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 00:50:08 +0300 Subject: [PATCH 07/10] [pre-commit.ci] pre-commit autoupdate (#316) --- .pre-commit-config.yaml | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb895c4..7124edc 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.15.9 + rev: v0.15.20 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 26.3.1 + rev: 26.5.1 hooks: - id: black @@ -22,7 +22,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.37.1 + rev: 0.37.4 hooks: - id: check-dependabot - id: check-github-workflows @@ -33,12 +33,12 @@ repos: - id: actionlint - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.23.1 + rev: v1.26.1 hooks: - id: zizmor - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.21.0 + rev: v2.25.1 hooks: - id: pyproject-fmt diff --git a/pyproject.toml b/pyproject.toml index 897ff85..7b81c4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,11 +38,11 @@ urls.Homepage = "https://github.com/python/python-docs-theme/" entry-points."sphinx.html_themes".python_docs_theme = "python_docs_theme" [tool.hatch] +version.path = "python_docs_theme/__init__.py" build.artifacts = [ "python_docs_theme/locale/**/*.mo" ] build.hooks.custom.path = "babel_runner.py" build.targets.wheel.packages = [ "python_docs_theme" ] build.targets.wheel.exclude = [ "python_docs_theme/locale/**/*.po" ] -version.path = "python_docs_theme/__init__.py" [tool.ruff] fix = true From 3209b93e413d47c2eb0216210f7f2a2850141a06 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:45:36 +0300 Subject: [PATCH 08/10] Remove old `.github/zizmor.yml` config file (#318) --- .github/zizmor.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .github/zizmor.yml diff --git a/.github/zizmor.yml b/.github/zizmor.yml deleted file mode 100644 index 7c776d5..0000000 --- a/.github/zizmor.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Configuration for the zizmor static analysis tool, run via prek in CI -# https://docs.zizmor.sh/configuration/ -rules: - dangerous-triggers: - ignore: - - documentation-links.yml From d1d0e1b7f16a0e5df8ec04839087aaa932cd7bc6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 27 Jul 2026 22:47:23 +0300 Subject: [PATCH 09/10] Fix install from sdist for RTD (#320) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dda3c23..9588bfa 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ # You can set these variables from the command line. CPYTHON_PATH = ../cpython PYTHON = python3 -PACKAGE_ABS_PATH = $(shell pwd)/$(shell find dist/python-docs-theme-*.tar.gz) SPHINXOPTS = @@ -15,10 +14,11 @@ help: .PHONY: venv venv: $(PYTHON) -m pip install build + rm -rf dist/ $(PYTHON) -m build cd $(CPYTHON_PATH)/Doc \ && make venv \ - && ./venv/bin/pip install $(PACKAGE_ABS_PATH) + && ./venv/bin/pip install $(CURDIR)/dist/python_docs_theme-*.tar.gz .PHONY: html html: venv From 42eac15beda21f151d1d183f348601b3da808f3e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 27 Jul 2026 23:09:50 +0300 Subject: [PATCH 10/10] Prepare 2026.7 release (#319) --- CHANGELOG.md | 5 +++++ python_docs_theme/__init__.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35e50ea..dbf11f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [2026.7](https://github.com/python/python-docs-theme/releases/tag/2026.7) + +* Add Vietnamese translation by @StanFromIreland in https://github.com/python/python-docs-theme/pull/309 +* Switch to Hatchling build hooks for i18n packaging and exclude .po from wheels by @StanFromIreland in https://github.com/python/python-docs-theme/pull/312 + ## [2026.4](https://github.com/python/python-docs-theme/releases/tag/2026.4) * Add styling for the `soft-deprecated` class by @StanFromIreland diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index 6708b6d..f0ddc06 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.4" +__version__ = "2026.7" THEME_PATH = Path(__file__).resolve().parent LOCALE_DIR = THEME_PATH / "locale"