Skip to content

[pull] master from sphinx-doc:master #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
292e026
Bump Ruff to 0.9.10
AA-Turner Mar 19, 2025
5c4b29e
Bump Ruff to 0.10.0
AA-Turner Mar 19, 2025
97d8d6b
Bump Ruff to 0.11.0
AA-Turner Mar 19, 2025
e01e42f
Fix ``INVALID_BUILTIN_CLASSES`` test for Python 3.14.0a6+
AA-Turner Mar 19, 2025
05838f0
Add an introduction to HTML templating (#13430)
vwheeler63 Mar 20, 2025
9d5c22e
Improve the error message for themes using the removed 'style' field …
AA-Turner Mar 20, 2025
e6e7f99
Bump pyright to 1.1.397 (#13440)
dependabot[bot] Mar 20, 2025
35b8bf0
Remove mypy overrides for ``tests.test_addnodes`` (#13420)
adamtheturtle Mar 20, 2025
62594f0
Remove mypy overrides for ``tests.test_events`` (#13422)
adamtheturtle Mar 20, 2025
21d93b5
Bump types-requests to 2.32.0.20250306 (#13416)
dependabot[bot] Mar 20, 2025
5bd70fc
Bump pypi-attestations to 0.0.22 (#13444)
AA-Turner Mar 20, 2025
9191c34
Bump types-pygments to 2.19.0.20250305 (#13412)
dependabot[bot] Mar 20, 2025
e979b1f
Use the PEP 735 ``[dependency-groups]`` table (#13073)
AA-Turner Mar 20, 2025
fc8054c
Fall back to 'en' if `format_date` is called with a falsy value (#13408)
akx Mar 20, 2025
7d4528b
Bump Ruff to 0.11.1 (#13447)
dependabot[bot] Mar 21, 2025
d066c2b
Remove mypy overrides for ``tests.test_application`` (#13421)
adamtheturtle Mar 21, 2025
10beeeb
Bump Ruff to 0.11.2 (#13450)
dependabot[bot] Mar 24, 2025
8049b4b
Allow ignoring type stub files for native modules (#13446)
AA-Turner Mar 24, 2025
c0c0413
Remove mypy overrides for ``tests.test_util.test_util_matching`` (#13…
adamtheturtle Mar 24, 2025
d9b20d0
Correctly parse and cross-reference unpacked type annotations (#13369)
agraboso Mar 24, 2025
5831b3e
Add ``doctest_fail_fast`` option to exit after the first failed test …
tillahoffmann Mar 24, 2025
41e0cf0
Upgrade to flit-core 3.12
AA-Turner Mar 25, 2025
466ccd0
Revert flit-core 3.11 temporary fix
AA-Turner Mar 25, 2025
628442e
Group the version variables together
AA-Turner Mar 25, 2025
c40ef2b
Delete non-exported names from ``sphinx/__init__.py``
AA-Turner Mar 25, 2025
3c4b4e3
Warn on all redirects if ``linkcheck_allowed_redirects`` is an empty …
AA-Turner Mar 27, 2025
a6d7ae1
linkcheck: documentation and validation suggestions for linkcheck_all…
jayaddison Apr 1, 2025
021d6a8
Bump types-requests to 2.32.0.20250328 (#13456)
dependabot[bot] Apr 9, 2025
14818ff
Bump Ruff to 0.11.3
AA-Turner Apr 27, 2025
eb5ca6e
Bump Ruff to 0.11.4
AA-Turner Apr 27, 2025
6928686
Bump Ruff to 0.11.5
AA-Turner Apr 27, 2025
92263a0
Bump Ruff to 0.11.6
AA-Turner Apr 27, 2025
052e1be
Bump Ruff to 0.11.7
AA-Turner Apr 27, 2025
8fef43c
Bump pyright to 1.1.400 (#13503)
dependabot[bot] Apr 27, 2025
239a709
Bump Twine to 6.1 (#13510)
AA-Turner Apr 27, 2025
586a6dc
Bump ``astral-sh/setup-uv`` to v6
AA-Turner Apr 27, 2025
3f617a3
Use dependency groups with pip 25.1 (#13512)
AA-Turner Apr 27, 2025
873b732
Use ``actions/setup-python`` for free-threaded testing (#13511)
AA-Turner Apr 27, 2025
b6aefed
Use a faster temporary directory for CI on Windows (#13513)
AA-Turner Apr 27, 2025
5e07baf
Bump pypi-attestations to 0.0.25
AA-Turner Apr 27, 2025
c4929d0
Fix typos (#13520)
hugovk Apr 29, 2025
97affba
Bump Ruff to 0.11.8
AA-Turner May 12, 2025
ad85bf8
Bump Ruff to 0.11.9
AA-Turner May 12, 2025
5a73bf6
Disallow untyped defs in ``tests/test_util/test_util_images.py`` (#13…
adamtheturtle May 12, 2025
0227606
Fix tests for Python 3.14.0a7 (#13527)
jayaddison May 12, 2025
059ee9c
Fix mypy failures
AA-Turner May 12, 2025
e6d67ca
Ensure Python clock timezone is reset during test teardown (#13537)
jayaddison May 12, 2025
c6e39d8
Add missing backslashes in LaTeX documentation (#13525)
SilverRainZ May 12, 2025
7838043
Support annotations and default values in ``_pseudo_parse_arglist`` (…
koyuki7w May 12, 2025
4051354
Mark tests as expected failures on Docutils 0.22.0rc2 (#13547)
AA-Turner May 12, 2025
5355a78
Fix ``test_util`` for Docutils 0.22+ (#13548)
AA-Turner May 12, 2025
f928da1
Fix tests for Docutils 0.22+ (#13549)
AA-Turner May 12, 2025
fefa2f2
Add ``section_parents`` to ``_fresh_title_style_context()`` (#13551)
AA-Turner May 12, 2025
a27f375
Emend the version changed note for ``linkcheck_allowed_redirects`` (#…
stevepiercy May 12, 2025
491999f
Docs: Fix ``nested_parse`` sample code (#13455)
koyuki7w May 13, 2025
05137c2
LaTeX: fix the #13525 fix of code-tex markup in docs
jfbu May 14, 2025
df171a9
Bump types-docutils to 0.21.0.20250514 (#13555)
dependabot[bot] May 14, 2025
0e3d50c
Bump types-pygments to 2.19.0.20250514 (#13556)
dependabot[bot] May 14, 2025
6210799
Revert "LaTeX: fix the #13525 fix of code-tex markup in docs"
jfbu May 14, 2025
3b46823
Bump types-requests to 2.32.0.20250515 (#13559)
dependabot[bot] May 15, 2025
c4d3705
Support C domain objects in the table of contents (#13497)
Cynerd May 16, 2025
c76d1bd
Merge ``SearchLanguage.init()`` into ``__init__()`` (#13562)
AA-Turner May 16, 2025
9ab73b2
Update URLs for the Snowball project (#13571)
AA-Turner May 18, 2025
c30effe
Pre-parse stopword lists for HTML search (#13572)
AA-Turner May 18, 2025
0296bbe
Bump types-defusedxml to 0.7.0.20250516 (#13563)
dependabot[bot] May 18, 2025
54ca933
Bump types-pygments to 2.19.0.20250516 (#13565)
dependabot[bot] May 18, 2025
647d9bd
Bump Ruff to 0.11.10 (#13566)
dependabot[bot] May 18, 2025
63fdb59
Bump pypi-attestations to 0.0.26
AA-Turner May 18, 2025
d4c036a
Update JavaScript sources for language stemmers to Snowball 3.0.1 (#1…
AA-Turner May 19, 2025
4532958
Remove ``const`` from ``BaseStemmer``
AA-Turner May 19, 2025
954839a
Use the more modern English stemmer (#13574)
AA-Turner May 19, 2025
75400af
Update stemming and Snowball (#13561)
AA-Turner May 19, 2025
0eae573
Remove ``section_parents`` (#13560)
AA-Turner May 19, 2025
fb628cc
Convert stopwords to a JavaScript set (#13575)
AA-Turner May 20, 2025
d71d399
autodoc: Support ``typing_extensions.{final,overload}`` (#13509)
TeamSpen210 May 20, 2025
ee0e576
Remove mypy overrides for ``test_transforms_move_module_targets`` (#1…
adamtheturtle May 20, 2025
4dbdf80
Remove mypy overrides for ``test_util_fileutil`` (#13552)
adamtheturtle May 20, 2025
6d15153
Add tilde prefix support for the ``:py:deco:`` role (#13545)
SilverRainZ May 21, 2025
ad360fd
Fix parameter lists for two event callback functions (#13516)
vwheeler63 May 21, 2025
d742ddc
Remove mypy overrides for ``tests/test_pycode/test_pycode.py`` (#13585)
adamtheturtle May 22, 2025
4451a0a
Remove mypy overrides for ``tests/test_util/test_util.py`` (#13584)
adamtheturtle May 22, 2025
a94fcd9
Remove mypy overrides for ``tests/test_util/test_util_inventory.py`` …
adamtheturtle May 22, 2025
2992f31
Remove mypy overrides for ``tests/test_pycode/test_pycode_ast.py`` (#…
adamtheturtle May 22, 2025
1a69059
Remove mypy overrides for ``tests/test_util/test_util_display.py`` (#…
adamtheturtle May 22, 2025
2c2159f
Adopt Prettier for JavaScript formatting (#13581)
AA-Turner May 24, 2025
cffaf3d
Remove unused fixture from ``test_config_pickle_protocol`` (#13590)
adamtheturtle May 24, 2025
7957429
Add initial Pyrefly configuration file (#13579)
AA-Turner May 24, 2025
a1b9444
Bump Ruff to 0.11.11 (#13589)
dependabot[bot] May 24, 2025
1f2821e
LaTeX: add support for fontawesome6 package
jfbu Apr 24, 2025
0d7ba3b
Add .auto/ to .gitignore (Emacs AUCTeX)
jfbu May 24, 2025
036db81
CI/LaTeX: run pdflatex twice when building documents
jfbu May 24, 2025
5461707
LaTeX: render in PDF hyperlinks located inside titles
jfbu Aug 25, 2024
31e63d7
Bump types-requests to 2.32.0.20250602 (#13605)
dependabot[bot] Jun 2, 2025
55092e7
Tests: Undo patch for Python 3.14.0 alpha 7; no longer required for 3…
jayaddison Jun 2, 2025
68d5610
Tests: update LaTeX label test expectations from Docutils r10151 (#13…
jayaddison Jun 2, 2025
03c2373
Extract ``_is_typing()`` to module level
AA-Turner Jun 2, 2025
987ccb2
Prefer ``str.partition`` over ``str.split(..., maxsize=1)``
AA-Turner Jun 2, 2025
2b7e3ad
Bump Ruff to 0.11.12
AA-Turner Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ tests/roots/test-pycode/cp_1251_coded.py working-tree-encoding=windows-1251

tests/js/fixtures/**/*.js generated
sphinx/search/minified-js/*.js generated
sphinx/search/_stopwords/ generated
sphinx/themes/bizstyle/static/css3-mediaqueries.js generated
4 changes: 2 additions & 2 deletions .github/workflows/builddoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
- name: Install graphviz
run: sudo apt-get install --no-install-recommends --yes graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[docs]
run: uv pip install . --group docs
- name: Render the documentation
run: >
sphinx-build
Expand Down
41 changes: 4 additions & 37 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,19 @@ jobs:
with:
python-version: "3"
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false

- name: Install build dependencies (pypa/build, twine)
run: |
uv pip install build "twine>=5.1"
# resolution fails without betterproto
uv pip install pypi-attestations==0.0.21 betterproto==2.0.0b6
run: uv pip install --group package

- name: Build distribution
run: python -m build

- name: Check distribution
run: |
twine check dist/*
run: twine check dist/*

- name: Create Sigstore attestations for built distributions
uses: actions/attest@v1
Expand Down Expand Up @@ -90,39 +86,10 @@ jobs:
name: attestation-bundles
path: /tmp/attestation-bundles/

- name: Mint PyPI API token
id: mint-token
uses: actions/github-script@v7
with:
# language=JavaScript
script: |
// retrieve the ambient OIDC token
const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
const oidc_resp = await fetch(`${oidc_request_url}&audience=pypi`, {
headers: {Authorization: `bearer ${oidc_request_token}`},
});
const oidc_token = (await oidc_resp.json()).value;

// exchange the OIDC token for an API token
const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
method: 'post',
body: `{"token": "${oidc_token}"}` ,
headers: {'Content-Type': 'application/json'},
});
const api_token = (await mint_resp.json()).token;

// mask the newly minted API token, so that we don't accidentally leak it
core.setSecret(api_token)
core.setOutput('api-token', api_token)

- name: Upload to PyPI
env:
TWINE_NON_INTERACTIVE: "true"
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: "${{ steps.mint-token.outputs.api-token }}"
run: |
twine upload dist/* --attestations
run: twine upload dist/* --attestations

github-release:
runs-on: ubuntu-latest
Expand Down
34 changes: 26 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
with:
python-version: "3"
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install ".[lint,test]"
run: uv pip install -r pyproject.toml --group package --group test --group types
- name: Type check with mypy
run: mypy

Expand All @@ -71,12 +71,12 @@ jobs:
with:
python-version: "3"
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install ".[lint,test]"
run: uv pip install -r pyproject.toml --group package --group test --group types
- name: Type check with pyright
run: pyright

Expand All @@ -92,12 +92,12 @@ jobs:
with:
python-version: "3"
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install --upgrade sphinx-lint
run: uv pip install --group lint
- name: Lint documentation with sphinx-lint
run: make doclinter

Expand All @@ -113,13 +113,31 @@ jobs:
with:
python-version: "3"
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install --upgrade twine build
run: uv pip install --group package
- name: Lint with twine
run: |
python -m build .
twine check dist/*

prettier:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: >
npx [email protected]
--check
"sphinx/themes/**/*.js"
"!sphinx/themes/bizstyle/static/css3-mediaqueries*.js"
"tests/js/**/*.{js,mjs}"
"!tests/js/fixtures/**"
77 changes: 29 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.13t"
docutils:
- "0.20"
- "0.21"
Expand All @@ -62,14 +63,18 @@ jobs:
- name: Install graphviz
run: sudo apt-get install --no-install-recommends --yes graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[test]
run: uv pip install . --group test
env:
UV_PYTHON: "python${{ matrix.python }}"
- name: Install Docutils ${{ matrix.docutils }}
run: uv pip install --upgrade "docutils~=${{ matrix.docutils }}.0"
env:
UV_PYTHON: "python${{ matrix.python }}"
- name: Test with pytest
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
Expand Down Expand Up @@ -103,46 +108,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
python -m pip install . --group test
- name: Install Docutils ${{ matrix.docutils }}
run: python -m pip install --upgrade "docutils~=${{ matrix.docutils }}.0"
- name: Test with pytest
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

free-threaded:
runs-on: ubuntu-latest
name: Python ${{ matrix.python }} (free-threaded)
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python:
- "3.13"

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python }} (deadsnakes)
uses: deadsnakes/[email protected]
with:
python-version: ${{ matrix.python }}
nogil: true
- name: Check Python version
run: python --version --version
- name: Install graphviz
run: sudo apt-get install --no-install-recommends --yes graphviz
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Test with pytest
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

deadsnakes-free-threaded:
runs-on: ubuntu-latest
name: Python ${{ matrix.python }} (free-threaded)
Expand All @@ -169,7 +142,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
python -m pip install . --group test
- name: Test with pytest
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
Expand All @@ -181,6 +154,14 @@ jobs:
timeout-minutes: 15

steps:
# https://github.com/actions/runner-images/issues/8755
# On standard runners, the D: drive is much faster.
- name: Set %TMP% and %TEMP% to D:\\Temp
run: |
mkdir "D:\\Tmp"
echo "TMP=D:\\Tmp" >> $env:GITHUB_ENV
echo "TEMP=D:\\Tmp" >> $env:GITHUB_ENV

- uses: actions/checkout@v4
with:
persist-credentials: false
Expand All @@ -193,12 +174,12 @@ jobs:
- name: Install graphviz
run: choco install --no-progress graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[test]
run: uv pip install . --group test
- name: Test with pytest
run: python -m pytest -vv --durations 25
env:
Expand All @@ -222,12 +203,12 @@ jobs:
- name: Install graphviz
run: brew install graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[test]
run: uv pip install . --group test
- name: Test with pytest
run: python -m pytest -vv --durations 25
env:
Expand Down Expand Up @@ -257,12 +238,12 @@ jobs:
- name: Install graphviz
run: sudo apt-get install --no-install-recommends --yes graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[test]
run: uv pip install . --group test
- name: Install Docutils' HEAD
run: uv pip install "docutils @ git+https://repo.or.cz/docutils.git#subdirectory=docutils"
- name: Test with pytest
Expand Down Expand Up @@ -290,13 +271,13 @@ jobs:
- name: Install graphviz
run: sudo apt-get install --no-install-recommends --yes graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: |
uv pip install .[test] --resolution lowest-direct
uv pip install . --group test --resolution lowest-direct
uv pip install alabaster==1.0.0
- name: Test with pytest
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
Expand All @@ -321,12 +302,12 @@ jobs:
- name: Check Python version
run: python --version --version
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[test]
run: uv pip install . --group test
- name: Test with pytest
run: python -m pytest -vv --durations 25
env:
Expand All @@ -352,12 +333,12 @@ jobs:
- name: Install graphviz
run: sudo apt-get install --no-install-recommends --yes graphviz
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install .[test] pytest-cov
run: uv pip install . --group test pytest-cov
- name: Test with pytest
run: python -m pytest -vv --cov . --cov-append --cov-config pyproject.toml
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/transifex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
curl -o- https://github.com/raw/transifex/cli/master/install.sh | bash
shell: bash
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install --upgrade babel jinja2
run: uv pip install --group translations
- name: Extract translations from source code
run: python utils/babel_runner.py extract
- name: Push translations to transifex.com
Expand Down Expand Up @@ -72,12 +72,12 @@ jobs:
curl -o- https://github.com/raw/transifex/cli/master/install.sh | bash
shell: bash
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
version: latest
enable-cache: false
- name: Install dependencies
run: uv pip install --upgrade babel jinja2
run: uv pip install --group translations
- name: Extract translations from source code
run: python utils/babel_runner.py extract
- name: Pull translations from transifex.com
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.so
*.swp

.auto/
.dir-locals.el
.cache/
.idea
Expand Down
Loading