python-docs-theme 2026.4__tar.gz → 2026.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_docs_theme-2026.7/.babel.cfg +3 -0
- python_docs_theme-2026.7/.github/dependabot.yml +14 -0
- python_docs_theme-2026.7/.github/release.yml +5 -0
- python_docs_theme-2026.7/.github/workflows/lint.yml +19 -0
- python_docs_theme-2026.7/.github/workflows/pypi-package.yml +52 -0
- python_docs_theme-2026.7/.github/workflows/tests.yml +95 -0
- python_docs_theme-2026.7/.gitignore +101 -0
- python_docs_theme-2026.7/.pre-commit-config.yaml +56 -0
- python_docs_theme-2026.7/.readthedocs.yml +15 -0
- python_docs_theme-2026.7/CHANGELOG.md +273 -0
- python_docs_theme-2026.7/CONTRIBUTING.md +27 -0
- python_docs_theme-2026.7/Makefile +30 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/PKG-INFO +8 -9
- python_docs_theme-2026.7/babel_runner.py +146 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/pyproject.toml +9 -5
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/__init__.py +1 -1
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ar/LC_MESSAGES/python-docs-theme.mo +0 -0
- python_docs_theme-2026.7/python_docs_theme/locale/de/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/de/LC_MESSAGES/python-docs-theme.po +0 -1
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/el/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/es/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/fr/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/id/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ja/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ko/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/pl/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/pt/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/pt_BR/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ro/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ru/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/sv/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ta/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/tr/LC_MESSAGES/python-docs-theme.mo +0 -0
- python_docs_theme-2026.7/python_docs_theme/locale/vi/LC_MESSAGES/python-docs-theme.mo +0 -0
- python_docs_theme-2026.7/python_docs_theme/locale/vi/LC_MESSAGES/python-docs-theme.po +129 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/zh_CN/LC_MESSAGES/python-docs-theme.mo +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/zh_TW/LC_MESSAGES/python-docs-theme.mo +0 -0
- python_docs_theme-2026.7/requirements.txt +4 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/LICENSE +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/README.md +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/footerdonate.html +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/layout.html +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ar/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/el/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/es/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/fr/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/id/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ja/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ko/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/pl/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/pt/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/pt_BR/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ro/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ru/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/sv/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/ta/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/tr/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/zh_CN/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/locale/zh_TW/LC_MESSAGES/python-docs-theme.po +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/copybutton.js +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/menu.js +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/py.svg +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/pydoctheme.css +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/pydoctheme_dark.css +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/search-focus.js +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/themetoggle.js +0 -0
- {python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/theme.toml +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request, workflow_dispatch]
|
|
4
|
+
|
|
5
|
+
permissions: {}
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
FORCE_COLOR: 1
|
|
9
|
+
RUFF_OUTPUT_FORMAT: github
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Build & maybe upload PyPI package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
release:
|
|
7
|
+
types:
|
|
8
|
+
- published
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
FORCE_COLOR: 1
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
# Always build & lint package.
|
|
18
|
+
build-package:
|
|
19
|
+
name: Build & verify package
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
24
|
+
with:
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
27
|
+
|
|
28
|
+
- uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0
|
|
29
|
+
|
|
30
|
+
# Upload to real PyPI on GitHub Releases.
|
|
31
|
+
release-pypi:
|
|
32
|
+
name: Publish to PyPI
|
|
33
|
+
environment: release-pypi
|
|
34
|
+
# Only run for published releases.
|
|
35
|
+
if: |
|
|
36
|
+
github.repository_owner == 'python'
|
|
37
|
+
&& github.event.action == 'published'
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
needs: build-package
|
|
40
|
+
|
|
41
|
+
permissions:
|
|
42
|
+
id-token: write
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- name: Download packages built by build-and-inspect-python-package
|
|
46
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
47
|
+
with:
|
|
48
|
+
name: Packages
|
|
49
|
+
path: dist
|
|
50
|
+
|
|
51
|
+
- name: Upload package to PyPI
|
|
52
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request, workflow_dispatch]
|
|
4
|
+
|
|
5
|
+
permissions: {}
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
FORCE_COLOR: 1
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build_doc:
|
|
12
|
+
name: Build CPython docs
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.15", "3.14", "3.13", "3.12"]
|
|
18
|
+
include:
|
|
19
|
+
- python-version: "3.15"
|
|
20
|
+
branch: "main"
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
allow-prereleases: true
|
|
29
|
+
cache: pip
|
|
30
|
+
- name: Clone docsbuild scripts
|
|
31
|
+
run: |
|
|
32
|
+
git clone https://github.com/python/docsbuild-scripts/
|
|
33
|
+
- name: Set up requirements
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
python -m pip install -r docsbuild-scripts/requirements.txt
|
|
37
|
+
- name: Build documentation
|
|
38
|
+
run: >
|
|
39
|
+
python ./docsbuild-scripts/build_docs.py
|
|
40
|
+
--quick
|
|
41
|
+
--build-root ./build_root
|
|
42
|
+
--www-root ./www
|
|
43
|
+
--log-directory ./logs
|
|
44
|
+
--group "$(id -g)"
|
|
45
|
+
--skip-cache-invalidation
|
|
46
|
+
--theme "$(pwd)"
|
|
47
|
+
--languages en
|
|
48
|
+
--branches ${{ matrix.branch || matrix.python-version }}
|
|
49
|
+
${{ matrix.branch == 'main' && '--select-output no-html' || '' }}
|
|
50
|
+
- name: Show logs
|
|
51
|
+
if: failure()
|
|
52
|
+
run: |
|
|
53
|
+
cat ./logs/docsbuild.log
|
|
54
|
+
- name: Upload
|
|
55
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
56
|
+
with:
|
|
57
|
+
name: doc-html-${{ matrix.python-version }}
|
|
58
|
+
path: www/
|
|
59
|
+
|
|
60
|
+
translations:
|
|
61
|
+
runs-on: ${{ matrix.os }}
|
|
62
|
+
strategy:
|
|
63
|
+
fail-fast: false
|
|
64
|
+
matrix:
|
|
65
|
+
os: ["ubuntu-latest", "windows-latest"]
|
|
66
|
+
# Test minimum supported and latest stable from 3.x series
|
|
67
|
+
python-version: ["3.12", "3"]
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
70
|
+
with:
|
|
71
|
+
persist-credentials: false
|
|
72
|
+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
73
|
+
with:
|
|
74
|
+
python-version: ${{ matrix.python-version }}
|
|
75
|
+
allow-prereleases: true
|
|
76
|
+
cache: pip
|
|
77
|
+
- name: Install dependencies
|
|
78
|
+
run: |
|
|
79
|
+
pip install --upgrade pip
|
|
80
|
+
pip install -r requirements.txt
|
|
81
|
+
- name: Remove locale file for testing
|
|
82
|
+
shell: bash
|
|
83
|
+
run: rm -rf python_docs_theme/locale/pt_BR/
|
|
84
|
+
- run: python babel_runner.py extract
|
|
85
|
+
- run: python babel_runner.py init -l pt_BR
|
|
86
|
+
- run: python babel_runner.py update
|
|
87
|
+
- run: python babel_runner.py update -l pt_BR
|
|
88
|
+
- run: python babel_runner.py compile
|
|
89
|
+
- run: python babel_runner.py compile -l pt_BR
|
|
90
|
+
- name: Print .pot file
|
|
91
|
+
shell: bash
|
|
92
|
+
run: cat python_docs_theme/locale/python-docs-theme.pot
|
|
93
|
+
- name: Print .po file
|
|
94
|
+
shell: bash
|
|
95
|
+
run: cat python_docs_theme/locale/pt_BR/LC_MESSAGES/python-docs-theme.po
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
env/
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
|
|
28
|
+
# PyInstaller
|
|
29
|
+
# Usually these files are written by a python script from a template
|
|
30
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
.hypothesis/
|
|
48
|
+
|
|
49
|
+
# Translations
|
|
50
|
+
*.mo
|
|
51
|
+
*.pot
|
|
52
|
+
|
|
53
|
+
# Django stuff:
|
|
54
|
+
*.log
|
|
55
|
+
local_settings.py
|
|
56
|
+
|
|
57
|
+
# Flask stuff:
|
|
58
|
+
instance/
|
|
59
|
+
.webassets-cache
|
|
60
|
+
|
|
61
|
+
# Scrapy stuff:
|
|
62
|
+
.scrapy
|
|
63
|
+
|
|
64
|
+
# Sphinx documentation
|
|
65
|
+
docs/_build/
|
|
66
|
+
|
|
67
|
+
# PyBuilder
|
|
68
|
+
target/
|
|
69
|
+
|
|
70
|
+
# Jupyter Notebook
|
|
71
|
+
.ipynb_checkpoints
|
|
72
|
+
|
|
73
|
+
# pyenv
|
|
74
|
+
.python-version
|
|
75
|
+
|
|
76
|
+
# celery beat schedule file
|
|
77
|
+
celerybeat-schedule
|
|
78
|
+
|
|
79
|
+
# SageMath parsed files
|
|
80
|
+
*.sage.py
|
|
81
|
+
|
|
82
|
+
# dotenv
|
|
83
|
+
.env
|
|
84
|
+
|
|
85
|
+
# virtualenv
|
|
86
|
+
.venv
|
|
87
|
+
venv/
|
|
88
|
+
ENV/
|
|
89
|
+
|
|
90
|
+
# Spyder project settings
|
|
91
|
+
.spyderproject
|
|
92
|
+
.spyproject
|
|
93
|
+
|
|
94
|
+
# Rope project settings
|
|
95
|
+
.ropeproject
|
|
96
|
+
|
|
97
|
+
# mkdocs documentation
|
|
98
|
+
/site
|
|
99
|
+
|
|
100
|
+
# mypy
|
|
101
|
+
.mypy_cache/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.20
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff-check
|
|
6
|
+
args: [--exit-non-zero-on-fix]
|
|
7
|
+
|
|
8
|
+
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
9
|
+
rev: 26.5.1
|
|
10
|
+
hooks:
|
|
11
|
+
- id: black
|
|
12
|
+
|
|
13
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
14
|
+
rev: v6.0.0
|
|
15
|
+
hooks:
|
|
16
|
+
- id: check-case-conflict
|
|
17
|
+
- id: check-merge-conflict
|
|
18
|
+
- id: check-toml
|
|
19
|
+
- id: check-yaml
|
|
20
|
+
- id: debug-statements
|
|
21
|
+
- id: end-of-file-fixer
|
|
22
|
+
- id: trailing-whitespace
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
25
|
+
rev: 0.37.4
|
|
26
|
+
hooks:
|
|
27
|
+
- id: check-dependabot
|
|
28
|
+
- id: check-github-workflows
|
|
29
|
+
|
|
30
|
+
- repo: https://github.com/rhysd/actionlint
|
|
31
|
+
rev: v1.7.12
|
|
32
|
+
hooks:
|
|
33
|
+
- id: actionlint
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
|
36
|
+
rev: v1.26.1
|
|
37
|
+
hooks:
|
|
38
|
+
- id: zizmor
|
|
39
|
+
|
|
40
|
+
- repo: https://github.com/tox-dev/pyproject-fmt
|
|
41
|
+
rev: v2.25.1
|
|
42
|
+
hooks:
|
|
43
|
+
- id: pyproject-fmt
|
|
44
|
+
|
|
45
|
+
- repo: https://github.com/abravalheri/validate-pyproject
|
|
46
|
+
rev: v0.25
|
|
47
|
+
hooks:
|
|
48
|
+
- id: validate-pyproject
|
|
49
|
+
|
|
50
|
+
- repo: meta
|
|
51
|
+
hooks:
|
|
52
|
+
- id: check-hooks-apply
|
|
53
|
+
- id: check-useless-excludes
|
|
54
|
+
|
|
55
|
+
ci:
|
|
56
|
+
autoupdate_schedule: quarterly
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
# Project page: https://readthedocs.org/projects/python-docs-theme-previews/
|
|
4
|
+
|
|
5
|
+
version: 2
|
|
6
|
+
|
|
7
|
+
build:
|
|
8
|
+
os: ubuntu-22.04
|
|
9
|
+
tools:
|
|
10
|
+
python: "3"
|
|
11
|
+
|
|
12
|
+
commands:
|
|
13
|
+
- git clone --depth=1 https://github.com/python/cpython
|
|
14
|
+
- make html CPYTHON_PATH=cpython
|
|
15
|
+
- mv cpython/Doc/build _readthedocs
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [2026.7](https://github.com/python/python-docs-theme/releases/tag/2026.7)
|
|
4
|
+
|
|
5
|
+
* Add Vietnamese translation by @StanFromIreland in https://github.com/python/python-docs-theme/pull/309
|
|
6
|
+
* 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
|
|
7
|
+
|
|
8
|
+
## [2026.4](https://github.com/python/python-docs-theme/releases/tag/2026.4)
|
|
9
|
+
|
|
10
|
+
* Add styling for the `soft-deprecated` class by @StanFromIreland
|
|
11
|
+
in https://github.com/python/python-docs-theme/pull/305
|
|
12
|
+
* Add Tamil translation in https://github.com/python/python-docs-theme/pull/304
|
|
13
|
+
* Fix the vertical alignment of `:Editor:` by @pradyunsg in
|
|
14
|
+
https://github.com/python/python-docs-theme/pull/303
|
|
15
|
+
|
|
16
|
+
## [2026.3](https://github.com/python/python-docs-theme/releases/tag/2026.3)
|
|
17
|
+
|
|
18
|
+
* Add colors for new thread-safety levels by @lysnikolaou in https://github.com/python/python-docs-theme/pull/299
|
|
19
|
+
|
|
20
|
+
## [2026.2](https://github.com/python/python-docs-theme/releases/tag/2026.2)
|
|
21
|
+
|
|
22
|
+
* Style codeblock `:caption:` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/288
|
|
23
|
+
* Enable copy button for shell sessions and consoles by @hugovk in https://github.com/python/python-docs-theme/pull/295
|
|
24
|
+
* Add colors for thread safety annotations by @lysnikolaou in https://github.com/python/python-docs-theme/pull/297
|
|
25
|
+
|
|
26
|
+
## [2025.12](https://github.com/python/python-docs-theme/releases/tag/2025.12)
|
|
27
|
+
|
|
28
|
+
* Add support for green, red and yellow side borders for code examples by @hugovk in https://github.com/python/python-docs-theme/pull/285
|
|
29
|
+
* Add Portuguese translation by @NyaPuma in https://github.com/python/python-docs-theme/pull/281
|
|
30
|
+
* Add support for Python 3.15 by @hugovk in https://github.com/python/python-docs-theme/pull/282
|
|
31
|
+
* Convert CHANGELOG and CONTRIBUTING from .rst to .md by @hugovk in https://github.com/python/python-docs-theme/pull/277
|
|
32
|
+
* Add zizmor to CI and fix findings by @hugovk in https://github.com/python/python-docs-theme/pull/283
|
|
33
|
+
|
|
34
|
+
## [2025.10](https://github.com/python/python-docs-theme/releases/tag/2025.10)
|
|
35
|
+
|
|
36
|
+
* Add Romanian translation by @octaG-M in https://github.com/python/python-docs-theme/pull/272
|
|
37
|
+
* Add Arabic and Russian translations by @StanFromIreland in https://github.com/python/python-docs-theme/pull/274
|
|
38
|
+
* Add French translation by @JulienPalard in https://github.com/python/python-docs-theme/pull/275
|
|
39
|
+
* Update authors in `pyproject.toml` by @StanFromIreland in https://github.com/python/python-docs-theme/pull/271
|
|
40
|
+
* Add link to devguide in README by @StanFromIreland in https://github.com/python/python-docs-theme/pull/266
|
|
41
|
+
|
|
42
|
+
## [2025.9.2](https://github.com/python/python-docs-theme/releases/tag/2025.9.2)
|
|
43
|
+
|
|
44
|
+
* Add Korean and Indonesian translations from Transifex in https://github.com/python/python-docs-theme/pull/264
|
|
45
|
+
* Add German translation by @cmaureir in https://github.com/python/python-docs-theme/pull/262
|
|
46
|
+
* Fix compilation of translations and loading of translations on pages with html
|
|
47
|
+
source in https://github.com/python/python-docs-theme/pull/263
|
|
48
|
+
* Fix search button cutting off long translations in https://github.com/python/python-docs-theme/pull/268
|
|
49
|
+
* Fix `Copy` button copying line numbers by @StanFromIreland in https://github.com/python/python-docs-theme/pull/270
|
|
50
|
+
|
|
51
|
+
## [2025.9.1](https://github.com/python/python-docs-theme/releases/tag/2025.9.1)
|
|
52
|
+
|
|
53
|
+
* Add Japanese, Turkish and Spanish translations from Transifex in https://github.com/python/python-docs-theme/pull/259
|
|
54
|
+
|
|
55
|
+
## [2025.9](https://github.com/python/python-docs-theme/releases/tag/2025.9)
|
|
56
|
+
|
|
57
|
+
* Enable theme translation and add Polish by @StanFromIreland in https://github.com/python/python-docs-theme/pull/246
|
|
58
|
+
* 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
|
|
59
|
+
* Add Swedish translation by @yeager in https://github.com/python/python-docs-theme/pull/250
|
|
60
|
+
* 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
|
|
61
|
+
|
|
62
|
+
## [2025.5](https://github.com/python/python-docs-theme/releases/tag/2025.5)
|
|
63
|
+
|
|
64
|
+
* Make the copy button only appear when hovered over or clicked on by @kevteg in https://github.com/python/python-docs-theme/pull/243
|
|
65
|
+
|
|
66
|
+
## [2025.4.1](https://github.com/python/python-docs-theme/releases/tag/2025.4.1)
|
|
67
|
+
|
|
68
|
+
* Fix copy button with multiple tracebacks by @tomasr8 in https://github.com/python/python-docs-theme/pull/240
|
|
69
|
+
|
|
70
|
+
## [2025.4](https://github.com/python/python-docs-theme/releases/tag/2025.4)
|
|
71
|
+
|
|
72
|
+
* Require Sphinx 7.3 by @AA-Turner in https://github.com/python/python-docs-theme/pull/221
|
|
73
|
+
* Add support for Python 3.14 by @hugovk https://github.com/python/python-docs-theme/pull/236
|
|
74
|
+
* Drop support for Python 3.10 and 3.11 by @hugovk in https://github.com/python/python-docs-theme/pull/234
|
|
75
|
+
* Add a copy button to code samples by @tomasr8 in https://github.com/python/python-docs-theme/pull/231
|
|
76
|
+
* Add missing i18n for copy button titles by @tomasr8 in https://github.com/python/python-docs-theme/pull/225
|
|
77
|
+
* Use consistent line-height for light & dark theme by @tomasr8 in https://github.com/python/python-docs-theme/pull/227
|
|
78
|
+
* Remove self-closing tags by @hugovk in https://github.com/python/python-docs-theme/pull/226
|
|
79
|
+
* Replace deprecated classifier with licence expression (PEP 639) by @hugovk in https://github.com/python/python-docs-theme/pull/237
|
|
80
|
+
|
|
81
|
+
## [2025.2](https://github.com/python/python-docs-theme/releases/tag/2025.2)
|
|
82
|
+
|
|
83
|
+
- Note minimum requirements for Sphinx (#216)
|
|
84
|
+
Contributed by Adam Turner
|
|
85
|
+
- Horizontally centre the sidebar collapse button (#219)
|
|
86
|
+
Contributed by Tomas Roun
|
|
87
|
+
- Make sidebar width more flexible (#218)
|
|
88
|
+
Contributed by Tomas Roun
|
|
89
|
+
- Set `__version__` in the runtime package (#222)
|
|
90
|
+
Contributed by Adam Turner
|
|
91
|
+
|
|
92
|
+
## [2024.12](https://github.com/python/python-docs-theme/releases/tag/2024.12)
|
|
93
|
+
|
|
94
|
+
- Hide header and search bar when printing (#204)
|
|
95
|
+
Contributed by Hugo van Kemenade
|
|
96
|
+
|
|
97
|
+
## [2024.10](https://github.com/python/python-docs-theme/releases/tag/2024.10)
|
|
98
|
+
|
|
99
|
+
- Add support for Python 3.13 (#196)
|
|
100
|
+
Contributed by Hugo van Kemenade
|
|
101
|
+
- Drop support for Python 3.8 (#197)
|
|
102
|
+
Contributed by Hugo van Kemenade
|
|
103
|
+
- Add script for handling translations (#195)
|
|
104
|
+
Contributed by Rafael Fontenelle
|
|
105
|
+
- Generate digital attestations for PyPI (PEP 740) (#198)
|
|
106
|
+
Contributed by Hugo van Kemenade
|
|
107
|
+
|
|
108
|
+
## [2024.6](https://github.com/python/python-docs-theme/releases/tag/2024.6)
|
|
109
|
+
|
|
110
|
+
- Add backgrounds and borders to admonitions (#190)
|
|
111
|
+
Contributed by Hugo van Kemenade
|
|
112
|
+
- Use different colour for 'Return value: Borrowed reference' (#188)
|
|
113
|
+
Contributed by Hugo van Kemenade
|
|
114
|
+
|
|
115
|
+
## [2024.4](https://github.com/python/python-docs-theme/releases/tag/2024.4)
|
|
116
|
+
|
|
117
|
+
- Add colour to version change directives (#185)
|
|
118
|
+
Contributed by Hugo van Kemenade
|
|
119
|
+
- Only show 'Last updated on ...' when `last_updated` defined (#183)
|
|
120
|
+
Contributed by Hugo van Kemenade
|
|
121
|
+
- Use system font stack for all code (#186)
|
|
122
|
+
Contributed by Hugo van Kemenade
|
|
123
|
+
|
|
124
|
+
## [2024.3](https://github.com/python/python-docs-theme/releases/tag/2024.3)
|
|
125
|
+
|
|
126
|
+
- Modernise font: use system font stack to improve text readability and webpage performance (#174)
|
|
127
|
+
Contributed by Hugo van Kemenade
|
|
128
|
+
- Remove incorrect CSS property (#178)
|
|
129
|
+
Contributed by Kerim Kabirov
|
|
130
|
+
|
|
131
|
+
## [2024.2](https://github.com/python/python-docs-theme/releases/tag/2024.2)
|
|
132
|
+
|
|
133
|
+
- Do not underline navigation links (#169)
|
|
134
|
+
Contributed by Hugo van Kemenade
|
|
135
|
+
- Only apply underline offset to code formatting for underline visibility (#171)
|
|
136
|
+
Contributed by Hugo van Kemenade
|
|
137
|
+
|
|
138
|
+
## [2024.1](https://github.com/python/python-docs-theme/releases/tag/2024.1)
|
|
139
|
+
|
|
140
|
+
- Underline links for readability and a11y (#160, #166)
|
|
141
|
+
Contributed by Hugo van Kemenade
|
|
142
|
+
- Add `hosted_on` variable for a link in the footer (#165)
|
|
143
|
+
Contributed by Hugo van Kemenade
|
|
144
|
+
- Consistently reference `theme_root_icon` (#163)
|
|
145
|
+
Contributed by Marko Budiselic
|
|
146
|
+
- Dark mode: fix contrast of footer highlight (#162)
|
|
147
|
+
Contributed by Hugo van Kemenade
|
|
148
|
+
|
|
149
|
+
## [2023.9](https://github.com/python/python-docs-theme/releases/tag/2023.9)
|
|
150
|
+
|
|
151
|
+
- Focus search box when pressing slash (#153)
|
|
152
|
+
Contributed by Hugo van Kemenade
|
|
153
|
+
|
|
154
|
+
## [2023.8](https://github.com/python/python-docs-theme/releases/tag/2023.8)
|
|
155
|
+
|
|
156
|
+
- Add Python 3.12 and 3.13 classifiers (#147)
|
|
157
|
+
Contributed by Hugo van Kemenade
|
|
158
|
+
- Dark mode: Also give aside.topic a dark background (#150)
|
|
159
|
+
Contributed by Hugo van Kemenade
|
|
160
|
+
- Restore the menu on mobile devices (inadvertently broken in 2023.7) (#146)
|
|
161
|
+
Contributed by Hugo van Kemenade
|
|
162
|
+
|
|
163
|
+
## [2023.7](https://github.com/python/python-docs-theme/releases/tag/2023.7)
|
|
164
|
+
|
|
165
|
+
- Fix compatibility with Sphinx 7.1 (#137)
|
|
166
|
+
Contributed by Pradyun Gedam
|
|
167
|
+
- Enable the slash keypress to focus the search field (#141)
|
|
168
|
+
Contributed by Mike Fiedler
|
|
169
|
+
- Sphinx 6.2 fix: add `nav.contents` where `div.topic` is used (#138)
|
|
170
|
+
Contributed by Hugo van Kemenade
|
|
171
|
+
- Dark mode: fix contrast for C++ specific styling (#133)
|
|
172
|
+
Contributed by Hugo van Kemenade
|
|
173
|
+
- Don't let long code literals extend beyond the right side of the screen (#139)
|
|
174
|
+
Contributed by Hugo van Kemenade
|
|
175
|
+
- Test with Python 3.12 (#140)
|
|
176
|
+
Contributed by Hugo van Kemenade
|
|
177
|
+
|
|
178
|
+
## [2023.5](https://github.com/python/python-docs-theme/releases/tag/2023.5)
|
|
179
|
+
|
|
180
|
+
- Add a dark theme. (#44)
|
|
181
|
+
Contributed by Nils K
|
|
182
|
+
- Fix: Remove searchbox id from form. (fixes #117)
|
|
183
|
+
Contributed by Nils K
|
|
184
|
+
- Update `python-docs-theme` to work with Sphinx 5 & 6. (#99 & #127)
|
|
185
|
+
Contributed by Adam Turner
|
|
186
|
+
- Override font for `.sig` for consistency with other code blocks. (#121)
|
|
187
|
+
Contributed by Chris Warrick
|
|
188
|
+
- Dark mode: add class to invert image brightness. (#128)
|
|
189
|
+
Contributed by Hugo van Kemenade
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
## [2023.3.1](https://github.com/python/python-docs-theme/releases/tag/2023.3.1)
|
|
193
|
+
|
|
194
|
+
- Skip cache-busting for old Sphinx #113
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
## [2023.3](https://github.com/python/python-docs-theme/releases/tag/2023.3)
|
|
198
|
+
|
|
199
|
+
- Fix problem with monospace rendering in Vivaldi #104
|
|
200
|
+
- Fix mobile nav obstructing content #96
|
|
201
|
+
- Reduce footer margin only for desktop #106
|
|
202
|
+
- Append a hash ?digest to CSS files for cache-busting #108
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## [2022.1](https://github.com/python/python-docs-theme/releases/tag/2022.1)
|
|
206
|
+
|
|
207
|
+
- Add a configuration for license URL. (#90)
|
|
208
|
+
- Exclude the floating navbar from CHM help. (#84)
|
|
209
|
+
- Make sidebar scrollable and sticky (on modern browsers) (#91)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## [2021.11.1](https://github.com/python/python-docs-theme/releases/tag/2021.11.1)
|
|
213
|
+
|
|
214
|
+
- Fix monospace again, on buggy Google Chrome (#87)
|
|
215
|
+
Contributed by Tushar Sadhwani
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## [2021.11](https://github.com/python/python-docs-theme/releases/tag/2021.11)
|
|
219
|
+
|
|
220
|
+
- Fix monospace on buggy Google Chrome (#85)
|
|
221
|
+
Contributed by Tushar Sadhwani
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
## [2021.8](https://github.com/python/python-docs-theme/releases/tag/2021.8)
|
|
225
|
+
|
|
226
|
+
- Add the copyright_url variable in the theme (#67)
|
|
227
|
+
Contributed by jablonskidev
|
|
228
|
+
- Improve readability (#79)
|
|
229
|
+
Contributed by Olga Bulat
|
|
230
|
+
- Remove #searchbox on mobile to fix a layout bug (#76)
|
|
231
|
+
Contributed by Olga Bulat
|
|
232
|
+
- Fix the appearance of version/language selects (#74)
|
|
233
|
+
Contributed by Olga Bulat
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## [2021.5](https://github.com/python/python-docs-theme/releases/tag/2021.5)
|
|
237
|
+
|
|
238
|
+
- Make the theme responsive (#46)
|
|
239
|
+
Contributed by Olga Bulat.
|
|
240
|
+
- Use Python 3.8 for the Github Actions (#71)
|
|
241
|
+
Contributed by Stéphane Wirtel.
|
|
242
|
+
- Use default pygments theme (#68)
|
|
243
|
+
Contributed by Aaron Carlisle.
|
|
244
|
+
- Test Github action to validate the theme against docsbuild scripts. (#69)
|
|
245
|
+
Contributed by Julien Palard.
|
|
246
|
+
- Add the copy button to pycon3 highlighted code blocks. (#64)
|
|
247
|
+
Contributed by Julien Palard.
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
## [2020.12](https://github.com/python/python-docs-theme/releases/tag/v2020.12)
|
|
251
|
+
|
|
252
|
+
- Updated the readme, to remind user to install the package in a virtual environment. (#41)
|
|
253
|
+
Contributed by Mariatta.
|
|
254
|
+
- Updated the package url, using the GitHub repository instead of docs.python.org (#49)
|
|
255
|
+
Contributed by Pradyun Gedam.
|
|
256
|
+
- Added license information to the footer of the doc (#36)
|
|
257
|
+
Contributed by Todd.
|
|
258
|
+
- Fixed typo in the footer (#52)
|
|
259
|
+
Contributed by Dominic Davis-Foster.
|
|
260
|
+
- Added information on how to use the package (#32)
|
|
261
|
+
Contributed by Tapasweni Pathak.
|
|
262
|
+
- Fixed code formatting (#53).
|
|
263
|
+
Contributed by Hugo van Kemenade.
|
|
264
|
+
- Fixed code bgcolor and codetextcolor for Sphinx 3.1.0+ (#57)
|
|
265
|
+
Contributed by Zhiming Wang.
|
|
266
|
+
|
|
267
|
+
## 2018.7
|
|
268
|
+
Corresponds to [44a8f30](https://github.com/python/python-docs-theme/commit/44a8f306db9ec86d277a8a687538d5d51e415130)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
## [2018.2](https://github.com/python/python-docs-theme/releases/tag/2018.2)
|
|
272
|
+
|
|
273
|
+
Initial release.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# How to release
|
|
2
|
+
|
|
3
|
+
- Update `CHANGELOG.md`
|
|
4
|
+
- Bump version (YYYY.MM) in `python_docs_theme/__init__.py`
|
|
5
|
+
- Commit
|
|
6
|
+
- Push to check tests pass on
|
|
7
|
+
[GitHub Actions](https://github.com/python/python-docs-theme/actions)
|
|
8
|
+
- Go to https://github.com/python/python-docs-theme/releases
|
|
9
|
+
- Click "Draft a new release"
|
|
10
|
+
- Click "Tag: Select tag"
|
|
11
|
+
- Type the next YYYY.MM version (no leading zero) and
|
|
12
|
+
select "Create new tag"
|
|
13
|
+
- Click "Create" for "YYYY.MM will be created on publish"
|
|
14
|
+
- Leave the "Release title" blank (it will be autofilled)
|
|
15
|
+
- Click "Generate release notes" and amend as required
|
|
16
|
+
- Click "Publish release"
|
|
17
|
+
- Check the tagged [GitHub Actions build](https://github.com/python/python-docs-theme/actions/workflows/pypi-package.yml)
|
|
18
|
+
has deployed to [PyPI](https://pypi.org/project/python-docs-theme/#history)
|
|
19
|
+
|
|
20
|
+
# Makefile usage
|
|
21
|
+
|
|
22
|
+
This project includes a simple Makefile for syncing changes to the theme with
|
|
23
|
+
the main CPython repository. Run `make help` for details on available rules.
|
|
24
|
+
|
|
25
|
+
There is one configurable variable, `CPYTHON_PATH`, which should be the path
|
|
26
|
+
to the CPython repository on your machine. By default, it points to
|
|
27
|
+
`../cpython`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# You can set these variables from the command line.
|
|
2
|
+
CPYTHON_PATH = ../cpython
|
|
3
|
+
PYTHON = python3
|
|
4
|
+
SPHINXOPTS =
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
.PHONY: help
|
|
8
|
+
help:
|
|
9
|
+
@echo "Please use \`make <target>' where <target> is one of"
|
|
10
|
+
@echo " venv to create a venv with necessary tools at $(CPYTHON_PATH)/Doc/venv"
|
|
11
|
+
@echo " html to make standalone CPython HTML files"
|
|
12
|
+
@echo " htmlview to open the index page built by the html target in your browser"
|
|
13
|
+
|
|
14
|
+
.PHONY: venv
|
|
15
|
+
venv:
|
|
16
|
+
$(PYTHON) -m pip install build
|
|
17
|
+
rm -rf dist/
|
|
18
|
+
$(PYTHON) -m build
|
|
19
|
+
cd $(CPYTHON_PATH)/Doc \
|
|
20
|
+
&& make venv \
|
|
21
|
+
&& ./venv/bin/pip install $(CURDIR)/dist/python_docs_theme-*.tar.gz
|
|
22
|
+
|
|
23
|
+
.PHONY: html
|
|
24
|
+
html: venv
|
|
25
|
+
cd $(CPYTHON_PATH)/Doc && \
|
|
26
|
+
make SPHINXOPTS="$(SPHINXOPTS)" html
|
|
27
|
+
|
|
28
|
+
.PHONY: htmlview
|
|
29
|
+
htmlview: html
|
|
30
|
+
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('$(CPYTHON_PATH)/Doc/build/html/index.html'))"
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-docs-theme
|
|
3
|
-
Version: 2026.
|
|
3
|
+
Version: 2026.7
|
|
4
4
|
Summary: The Sphinx theme for the CPython docs and related projects
|
|
5
|
+
Project-URL: Issue tracker, https://github.com/python/python-docs-theme/issues
|
|
6
|
+
Project-URL: Code, https://github.com/python/python-docs-theme
|
|
7
|
+
Project-URL: Download, https://pypi.org/project/python-docs-theme/
|
|
8
|
+
Project-URL: Homepage, https://github.com/python/python-docs-theme/
|
|
5
9
|
Author: Python Docs Sphinx Theme maintainers
|
|
6
|
-
Requires-Python: >=3.12
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
10
|
License-Expression: PSF-2.0
|
|
11
|
+
License-File: LICENSE
|
|
9
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
13
|
Classifier: Framework :: Sphinx :: Theme
|
|
11
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -18,12 +21,9 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
18
21
|
Classifier: Programming Language :: Python :: 3.15
|
|
19
22
|
Classifier: Topic :: Documentation
|
|
20
23
|
Classifier: Topic :: Software Development :: Documentation
|
|
21
|
-
|
|
24
|
+
Requires-Python: >=3.12
|
|
22
25
|
Requires-Dist: sphinx>=7.3
|
|
23
|
-
|
|
24
|
-
Project-URL: Download, https://pypi.org/project/python-docs-theme/
|
|
25
|
-
Project-URL: Homepage, https://github.com/python/python-docs-theme/
|
|
26
|
-
Project-URL: Issue tracker, https://github.com/python/python-docs-theme/issues
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
27
|
|
|
28
28
|
# Python Docs Sphinx Theme
|
|
29
29
|
|
|
@@ -65,4 +65,3 @@ See a demo of the CPython docs using this theme:
|
|
|
65
65
|
The kitchen sink is a showcase of every Sphinx feature:
|
|
66
66
|
|
|
67
67
|
- https://sphinx-themes.org/sample-sites/python-docs-theme/kitchen-sink/
|
|
68
|
-
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""Script for handling translations with Babel"""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import ast
|
|
7
|
+
import subprocess
|
|
8
|
+
import tomllib
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
12
|
+
|
|
13
|
+
# Global variables used by pybabel below (paths relative to PROJECT_DIR)
|
|
14
|
+
DOMAIN = "python-docs-theme"
|
|
15
|
+
COPYRIGHT_HOLDER = "Python Software Foundation"
|
|
16
|
+
SOURCE_DIR = "python_docs_theme"
|
|
17
|
+
MAPPING_FILE = ".babel.cfg"
|
|
18
|
+
|
|
19
|
+
PROJECT_DIR = Path(__file__).resolve().parent
|
|
20
|
+
PYPROJECT_TOML = Path(PROJECT_DIR, "pyproject.toml")
|
|
21
|
+
INIT_PY = PROJECT_DIR / SOURCE_DIR / "__init__.py"
|
|
22
|
+
LOCALES_DIR = Path(f"{SOURCE_DIR}", "locale")
|
|
23
|
+
POT_FILE = Path(LOCALES_DIR, f"{DOMAIN}.pot")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def get_project_info() -> dict:
|
|
27
|
+
"""Retrieve project's info to populate the message catalog template"""
|
|
28
|
+
pyproject_text = PYPROJECT_TOML.read_text(encoding="utf-8")
|
|
29
|
+
project_data = tomllib.loads(pyproject_text)["project"]
|
|
30
|
+
|
|
31
|
+
# read __version__ from __init__.py
|
|
32
|
+
for child in ast.parse(INIT_PY.read_bytes()).body:
|
|
33
|
+
if not isinstance(child, ast.Assign):
|
|
34
|
+
continue
|
|
35
|
+
target = child.targets[0]
|
|
36
|
+
if not isinstance(target, ast.Name) or target.id != "__version__":
|
|
37
|
+
continue
|
|
38
|
+
version_node = child.value
|
|
39
|
+
if not isinstance(version_node, ast.Constant):
|
|
40
|
+
continue
|
|
41
|
+
project_data["version"] = version_node.value
|
|
42
|
+
break
|
|
43
|
+
|
|
44
|
+
return project_data
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def extract_messages() -> None:
|
|
48
|
+
"""Extract messages from all source files into message catalog template"""
|
|
49
|
+
Path(PROJECT_DIR, LOCALES_DIR).mkdir(parents=True, exist_ok=True)
|
|
50
|
+
project_data = get_project_info()
|
|
51
|
+
subprocess.run(
|
|
52
|
+
[
|
|
53
|
+
"pybabel",
|
|
54
|
+
"extract",
|
|
55
|
+
"-F",
|
|
56
|
+
MAPPING_FILE,
|
|
57
|
+
"--copyright-holder",
|
|
58
|
+
COPYRIGHT_HOLDER,
|
|
59
|
+
"--project",
|
|
60
|
+
project_data["name"],
|
|
61
|
+
"--version",
|
|
62
|
+
project_data["version"],
|
|
63
|
+
"--msgid-bugs-address",
|
|
64
|
+
project_data["urls"]["Issue tracker"],
|
|
65
|
+
"-o",
|
|
66
|
+
POT_FILE,
|
|
67
|
+
SOURCE_DIR,
|
|
68
|
+
],
|
|
69
|
+
cwd=PROJECT_DIR,
|
|
70
|
+
check=True,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def init_locale(locale: str) -> None:
|
|
75
|
+
"""Initialize a new locale based on existing message catalog template"""
|
|
76
|
+
pofile = PROJECT_DIR / LOCALES_DIR / locale / "LC_MESSAGES" / f"{DOMAIN}.po"
|
|
77
|
+
if pofile.exists():
|
|
78
|
+
print(f"There is already a message catalog for locale {locale}, skipping.")
|
|
79
|
+
return
|
|
80
|
+
cmd = [
|
|
81
|
+
"pybabel",
|
|
82
|
+
"init",
|
|
83
|
+
"-i",
|
|
84
|
+
POT_FILE,
|
|
85
|
+
"-d",
|
|
86
|
+
LOCALES_DIR,
|
|
87
|
+
"-D",
|
|
88
|
+
DOMAIN,
|
|
89
|
+
"-l",
|
|
90
|
+
locale,
|
|
91
|
+
]
|
|
92
|
+
subprocess.run(cmd, cwd=PROJECT_DIR, check=True)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def update_catalogs(locale: str) -> None:
|
|
96
|
+
"""Update translations from existing message catalogs"""
|
|
97
|
+
cmd = ["pybabel", "update", "-i", POT_FILE, "-d", LOCALES_DIR, "-D", DOMAIN]
|
|
98
|
+
if locale:
|
|
99
|
+
cmd.extend(["-l", locale])
|
|
100
|
+
subprocess.run(cmd, cwd=PROJECT_DIR, check=True)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def compile_catalogs(locale: str) -> None:
|
|
104
|
+
"""Compile existing message catalogs"""
|
|
105
|
+
cmd = ["pybabel", "compile", "-d", LOCALES_DIR, "-D", DOMAIN]
|
|
106
|
+
if locale:
|
|
107
|
+
cmd.extend(["-l", locale])
|
|
108
|
+
subprocess.run(cmd, cwd=PROJECT_DIR, check=True)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class CustomBuildHook(BuildHookInterface):
|
|
112
|
+
def initialize(self, version: str, build_data: dict[str, object]) -> None:
|
|
113
|
+
compile_catalogs("")
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def main() -> None:
|
|
117
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
118
|
+
parser.add_argument(
|
|
119
|
+
"command",
|
|
120
|
+
choices=["extract", "init", "update", "compile"],
|
|
121
|
+
help="command to be executed",
|
|
122
|
+
)
|
|
123
|
+
parser.add_argument(
|
|
124
|
+
"-l",
|
|
125
|
+
"--locale",
|
|
126
|
+
default="",
|
|
127
|
+
help="language code (needed for init, optional for update and compile)",
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
args = parser.parse_args()
|
|
131
|
+
locale = args.locale
|
|
132
|
+
|
|
133
|
+
if args.command == "extract":
|
|
134
|
+
extract_messages()
|
|
135
|
+
elif args.command == "init":
|
|
136
|
+
if not locale:
|
|
137
|
+
parser.error("init requires passing the --locale option")
|
|
138
|
+
init_locale(locale)
|
|
139
|
+
elif args.command == "update":
|
|
140
|
+
update_catalogs(locale)
|
|
141
|
+
elif args.command == "compile":
|
|
142
|
+
compile_catalogs(locale)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
if __name__ == "__main__":
|
|
146
|
+
main()
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
build-backend = "
|
|
2
|
+
build-backend = "hatchling.build"
|
|
3
3
|
requires = [
|
|
4
|
-
"
|
|
4
|
+
"babel",
|
|
5
|
+
"hatchling",
|
|
5
6
|
]
|
|
6
7
|
|
|
7
8
|
[project]
|
|
@@ -36,9 +37,12 @@ urls.Download = "https://pypi.org/project/python-docs-theme/"
|
|
|
36
37
|
urls.Homepage = "https://github.com/python/python-docs-theme/"
|
|
37
38
|
entry-points."sphinx.html_themes".python_docs_theme = "python_docs_theme"
|
|
38
39
|
|
|
39
|
-
[tool.
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
[tool.hatch]
|
|
41
|
+
version.path = "python_docs_theme/__init__.py"
|
|
42
|
+
build.artifacts = [ "python_docs_theme/locale/**/*.mo" ]
|
|
43
|
+
build.hooks.custom.path = "babel_runner.py"
|
|
44
|
+
build.targets.wheel.packages = [ "python_docs_theme" ]
|
|
45
|
+
build.targets.wheel.exclude = [ "python_docs_theme/locale/**/*.po" ]
|
|
42
46
|
|
|
43
47
|
[tool.ruff]
|
|
44
48
|
fix = true
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Translations template for python-docs-theme.
|
|
2
|
+
# Copyright (C) 2026 Python Software Foundation
|
|
3
|
+
# This file is distributed under the same license as the python-docs-theme
|
|
4
|
+
# project.
|
|
5
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2026.
|
|
6
|
+
#
|
|
7
|
+
# Translators:
|
|
8
|
+
# Nguyen Duc Tam, 2026
|
|
9
|
+
#
|
|
10
|
+
msgid ""
|
|
11
|
+
msgstr ""
|
|
12
|
+
"Project-Id-Version: python-docs-theme 2026.4\n"
|
|
13
|
+
"Report-Msgid-Bugs-To: https://github.com/python/python-docs-theme/issues\n"
|
|
14
|
+
"POT-Creation-Date: 2026-04-27 03:20+0000\n"
|
|
15
|
+
"PO-Revision-Date: 2025-09-06 07:41+0000\n"
|
|
16
|
+
"Last-Translator: Nguyen Duc Tam, 2026\n"
|
|
17
|
+
"Language-Team: Vietnamese (https://app.transifex.com/python-doc/teams/5390/vi/)\n"
|
|
18
|
+
"MIME-Version: 1.0\n"
|
|
19
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
20
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
21
|
+
"Generated-By: Babel 2.18.0\n"
|
|
22
|
+
"Language: vi\n"
|
|
23
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
24
|
+
|
|
25
|
+
#: python_docs_theme/footerdonate.html:1
|
|
26
|
+
msgid "The Python Software Foundation is a non-profit corporation."
|
|
27
|
+
msgstr "Python Software Foundation là một tổ chức phi lợi nhuận."
|
|
28
|
+
|
|
29
|
+
#: python_docs_theme/footerdonate.html:2
|
|
30
|
+
msgid "Please donate."
|
|
31
|
+
msgstr "Vui lòng quyên góp."
|
|
32
|
+
|
|
33
|
+
#: python_docs_theme/layout.html:6
|
|
34
|
+
msgid "Navigation"
|
|
35
|
+
msgstr "Điều hướng"
|
|
36
|
+
|
|
37
|
+
#: python_docs_theme/layout.html:51 python_docs_theme/layout.html:111
|
|
38
|
+
msgid "Quick search"
|
|
39
|
+
msgstr "Tìm kiếm nhanh"
|
|
40
|
+
|
|
41
|
+
#: python_docs_theme/layout.html:52 python_docs_theme/layout.html:112
|
|
42
|
+
msgid "Go"
|
|
43
|
+
msgstr "Đi tiếp"
|
|
44
|
+
|
|
45
|
+
#: python_docs_theme/layout.html:60
|
|
46
|
+
msgid "Theme"
|
|
47
|
+
msgstr "Theme"
|
|
48
|
+
|
|
49
|
+
#: python_docs_theme/layout.html:62
|
|
50
|
+
msgid "Auto"
|
|
51
|
+
msgstr "Tự động"
|
|
52
|
+
|
|
53
|
+
#: python_docs_theme/layout.html:63
|
|
54
|
+
msgid "Light"
|
|
55
|
+
msgstr "Sáng"
|
|
56
|
+
|
|
57
|
+
#: python_docs_theme/layout.html:64
|
|
58
|
+
msgid "Dark"
|
|
59
|
+
msgstr " Tối"
|
|
60
|
+
|
|
61
|
+
#: python_docs_theme/layout.html:96
|
|
62
|
+
msgid "Menu"
|
|
63
|
+
msgstr "Menu"
|
|
64
|
+
|
|
65
|
+
#: python_docs_theme/layout.html:142
|
|
66
|
+
msgid "Copyright"
|
|
67
|
+
msgstr "Bản quyền"
|
|
68
|
+
|
|
69
|
+
#: python_docs_theme/layout.html:147
|
|
70
|
+
msgid ""
|
|
71
|
+
"This page is licensed under the Python Software Foundation License Version "
|
|
72
|
+
"2."
|
|
73
|
+
msgstr ""
|
|
74
|
+
"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"
|
|
75
|
+
" 2."
|
|
76
|
+
|
|
77
|
+
#: python_docs_theme/layout.html:149
|
|
78
|
+
msgid ""
|
|
79
|
+
"Examples, recipes, and other code in the documentation are additionally "
|
|
80
|
+
"licensed under the Zero Clause BSD License."
|
|
81
|
+
msgstr ""
|
|
82
|
+
"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 "
|
|
83
|
+
"bổ sung theo Giấy phép BSD Không Điều khoản."
|
|
84
|
+
|
|
85
|
+
#: python_docs_theme/layout.html:152
|
|
86
|
+
#, python-format
|
|
87
|
+
msgid ""
|
|
88
|
+
"See <a href=\"%(license_file)s\">History and License</a> for more "
|
|
89
|
+
"information."
|
|
90
|
+
msgstr ""
|
|
91
|
+
"Xem <a href=\"%(license_file)s\">Lịch sử và Giấy phép</a> để biết thêm thông"
|
|
92
|
+
" tin."
|
|
93
|
+
|
|
94
|
+
#: python_docs_theme/layout.html:155
|
|
95
|
+
#, python-format
|
|
96
|
+
msgid "Hosted on %(hosted_on)s."
|
|
97
|
+
msgstr "Được lưu trữ trên %(hosted_on)s."
|
|
98
|
+
|
|
99
|
+
#: python_docs_theme/layout.html:163
|
|
100
|
+
#, python-format
|
|
101
|
+
msgid "Last updated on %(last_updated)s."
|
|
102
|
+
msgstr "Cập nhật lần cuối vào %(last_updated)s."
|
|
103
|
+
|
|
104
|
+
#: python_docs_theme/layout.html:166
|
|
105
|
+
#, python-format
|
|
106
|
+
msgid "<a href=\"%(theme_issues_url)s\">Found a bug</a>?"
|
|
107
|
+
msgstr "<a href=\"%(theme_issues_url)s\">Tìm thấy lỗi</a>?"
|
|
108
|
+
|
|
109
|
+
#: python_docs_theme/layout.html:170
|
|
110
|
+
#, python-format
|
|
111
|
+
msgid ""
|
|
112
|
+
"Created using <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> "
|
|
113
|
+
"%(sphinx_version)s."
|
|
114
|
+
msgstr ""
|
|
115
|
+
"Được tạo bằng <a href=\"https://www.sphinx-doc.org/\">Sphinx</a> "
|
|
116
|
+
"%(sphinx_version)s. "
|
|
117
|
+
|
|
118
|
+
#: python_docs_theme/static/copybutton.js:30
|
|
119
|
+
#: python_docs_theme/static/copybutton.js:55
|
|
120
|
+
msgid "Copy"
|
|
121
|
+
msgstr "Sao chép"
|
|
122
|
+
|
|
123
|
+
#: python_docs_theme/static/copybutton.js:31
|
|
124
|
+
msgid "Copy to clipboard"
|
|
125
|
+
msgstr "Sao chép vào clipboard"
|
|
126
|
+
|
|
127
|
+
#: python_docs_theme/static/copybutton.js:53
|
|
128
|
+
msgid "Copied!"
|
|
129
|
+
msgstr "Đã sao chép!"
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/copybutton.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/pydoctheme.css
RENAMED
|
File without changes
|
{python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/pydoctheme_dark.css
RENAMED
|
File without changes
|
{python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/search-focus.js
RENAMED
|
File without changes
|
{python_docs_theme-2026.4 → python_docs_theme-2026.7}/python_docs_theme/static/themetoggle.js
RENAMED
|
File without changes
|
|
File without changes
|