Skip to content

Commit cff3cfb

Browse files
authored
Merge branch 'master' into search-button
2 parents 7d235af + c68f846 commit cff3cfb

File tree

996 files changed

+222040
-187885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

996 files changed

+222040
-187885
lines changed

.flake8

Lines changed: 0 additions & 37 deletions
This file was deleted.

.gitattributes

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Binary data types
2+
*.gif binary
3+
*.jpg binary
4+
*.mo binary
5+
*.pdf binary
6+
*.png binary
7+
*.zip binary
8+
9+
# Unix-style line endings
10+
[attr]unix text eol=lf
11+
12+
*.conf unix
13+
*.css unix
14+
*.cls unix
15+
*.csv unix
16+
*.dot unix
17+
*.html unix
18+
*.inc unix
19+
*.ini unix
20+
*.jinja unix
21+
*.js unix
22+
*.md unix
23+
*.mjs unix
24+
*.py unix
25+
*.rst unix
26+
*.sty unix
27+
*.tex unix
28+
*.toml unix
29+
*.txt unix
30+
*.svg unix
31+
*.xml unix
32+
*.yml unix
33+
34+
# CRLF files
35+
[attr]dos text eol=crlf
36+
37+
*.bat dos
38+
*.bat.jinja dos
39+
*.stp dos
40+
tests/roots/test-pycode/cp_1251_coded.py dos
41+
42+
# Language aware diff headers
43+
*.c diff=cpp
44+
*.h diff=cpp
45+
*.css diff=css
46+
*.html diff=html
47+
*.md diff=markdown
48+
*.py diff=python
49+
# *.rst diff=reStructuredText
50+
*.tex diff=tex
51+
52+
# Non UTF-8 encodings
53+
tests/roots/test-pycode/cp_1251_coded.py working-tree-encoding=windows-1251
54+
55+
# Generated files
56+
# https://github.com/github/linguist/blob/master/docs/overrides.md
57+
#
58+
# To always hide generated files in local diffs, mark them as binary:
59+
# $ git config diff.generated.binary true
60+
#
61+
[attr]generated linguist-generated=true diff=generated
62+
63+
tests/js/fixtures/**/*.js generated
64+
sphinx/search/minified-js/*.js generated
65+
sphinx/themes/bizstyle/static/css3-mediaqueries.js generated

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ contact_links:
55
url: https://stackoverflow.com/questions/tagged/python-sphinx
66
about: For Q&A purpose, please use Stackoverflow with the tag python-sphinx
77
- name: Discussion
8-
url: https://groups.google.com/forum/#!forum/sphinx-users
9-
about: For general discussion, please use sphinx-users mailing list.
8+
url: https://github.com/sphinx-doc/sphinx/discussions
9+
about: For general discussion, please use GitHub Discussions.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
Subject: <short purpose of this pull request>
1+
<!--
2+
Thank you for creating this pull request and for spending time to help Sphinx!
3+
Our contributors' guide can be found online: https://www.sphinx-doc.org/en/master/internals/contributing.html
4+
Ask any questions at https://github.com/sphinx-doc/sphinx/discussions
5+
-->
26

3-
### Feature or Bugfix
4-
<!-- please choose -->
5-
- Feature
6-
- Bugfix
7-
- Refactoring
87

9-
### Purpose
10-
- <long purpose of this pull request>
11-
- <Environment if this PR depends on>
8+
## Purpose
129

13-
### Detail
14-
- <feature1 or bug1>
15-
- <feature2 or bug2>
10+
<!--
11+
A description of the purpose of this pull request.
12+
Ensure that all relevant information is included for reviewers,
13+
including any environment-specific details.
1614
17-
### Relates
18-
- <URL or Ticket>
15+
* If you plan to add tests or documentation after opening this PR,
16+
please note it here.
17+
* For user-visible changes, remember to add an entry to CHANGES.rst.
18+
* Please add your name to AUTHORS.rst if you haven't already!
19+
-->
1920

21+
22+
## References
23+
24+
<!--
25+
Please add any relevant links here, especially including any
26+
GitHub issues or Pull Requests that this PR would resolve.
27+
This helps to ensure that reviewers have context from
28+
previous discussions or decisions.
29+
-->
30+
31+
- <...>
32+
- <...>
33+
- <...>

.github/workflows/builddoc.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,34 @@ concurrency:
1414

1515
env:
1616
FORCE_COLOR: "1"
17+
UV_SYSTEM_PYTHON: "1" # make uv do global installs
1718

1819
jobs:
19-
build:
20+
verbose:
2021
runs-on: ubuntu-latest
2122

2223
steps:
2324
- uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
2427
- name: Set up Python
2528
uses: actions/setup-python@v5
2629
with:
2730
python-version: "3"
2831
- name: Install graphviz
29-
run: sudo apt-get install graphviz
32+
run: sudo apt-get install --no-install-recommends --yes graphviz
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v5
35+
with:
36+
version: latest
37+
enable-cache: false
3038
- name: Install dependencies
31-
run: |
32-
python -m pip install --upgrade pip
33-
python -m pip install .[docs]
39+
run: uv pip install .[docs]
3440
- name: Render the documentation
3541
run: >
3642
sphinx-build
3743
-M html ./doc ./build/sphinx
38-
-vv
44+
--verbose
3945
--jobs=auto
4046
--show-traceback
4147
--fail-on-warning
42-
--keep-going

.github/workflows/create-release.yml

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,86 @@ on:
99
permissions:
1010
contents: read
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
env:
17+
FORCE_COLOR: "1"
18+
UV_SYSTEM_PYTHON: "1" # make uv do global installs
19+
1220
jobs:
1321
publish-pypi:
1422
runs-on: ubuntu-latest
1523
name: PyPI Release
1624
environment: release
25+
if: github.repository_owner == 'sphinx-doc'
1726
permissions:
27+
attestations: write # for actions/attest
1828
id-token: write # for PyPI trusted publishing
1929
steps:
2030
- uses: actions/checkout@v4
31+
with:
32+
persist-credentials: false
2133
- name: Set up Python
2234
uses: actions/setup-python@v5
2335
with:
2436
python-version: "3"
25-
cache: pip
26-
cache-dependency-path: pyproject.toml
37+
- name: Install uv
38+
uses: astral-sh/setup-uv@v5
39+
with:
40+
version: latest
41+
enable-cache: false
2742

2843
- name: Install build dependencies (pypa/build, twine)
2944
run: |
30-
pip install -U pip
31-
pip install build twine
45+
uv pip install build "twine>=5.1"
3246
3347
- name: Build distribution
3448
run: python -m build
3549

50+
- name: Check distribution
51+
run: |
52+
twine check dist/*
53+
54+
- name: Create Sigstore attestations for built distributions
55+
uses: actions/attest@v1
56+
id: attest
57+
with:
58+
subject-path: "dist/*"
59+
predicate-type: "https://docs.pypi.org/attestations/publish/v1"
60+
predicate: "null"
61+
show-summary: "true"
62+
63+
- name: Convert attestations to PEP 740
64+
run: >
65+
uv run utils/convert_attestations.py
66+
"$BUNDLE_PATH"
67+
"$SIGNER_IDENTITY"
68+
env:
69+
BUNDLE_PATH: "${{ steps.attest.outputs.bundle-path }}"
70+
# workflow_ref example: sphinx-doc/sphinx/.github/workflows/create-release.yml@refs/heads/master
71+
# this forms the "signer identity" for the attestations
72+
SIGNER_IDENTITY: "https://github.com/${{ github.workflow_ref }}"
73+
74+
- name: Inspect PEP 740 attestations
75+
run: |
76+
python -m pypi_attestations inspect dist/*.publish.attestation
77+
78+
- name: Prepare attestation bundles for uploading
79+
run: |
80+
mkdir -p /tmp/attestation-bundles
81+
cp "$BUNDLE_PATH" /tmp/attestation-bundles/
82+
cp dist/*.publish.attestation /tmp/attestation-bundles/
83+
env:
84+
BUNDLE_PATH: "${{ steps.attest.outputs.bundle-path }}"
85+
86+
- name: Upload attestation bundles
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: attestation-bundles
90+
path: /tmp/attestation-bundles/
91+
3692
- name: Mint PyPI API token
3793
id: mint-token
3894
uses: actions/github-script@v7
@@ -46,7 +102,7 @@ jobs:
46102
headers: {Authorization: `bearer ${oidc_request_token}`},
47103
});
48104
const oidc_token = (await oidc_resp.json()).value;
49-
105+
50106
// exchange the OIDC token for an API token
51107
const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
52108
method: 'post',
@@ -65,17 +121,19 @@ jobs:
65121
TWINE_USERNAME: "__token__"
66122
TWINE_PASSWORD: "${{ steps.mint-token.outputs.api-token }}"
67123
run: |
68-
twine check dist/*
69-
twine upload dist/*
124+
twine upload dist/* --attestations
70125
71126
github-release:
72127
runs-on: ubuntu-latest
73128
name: GitHub release
74129
environment: release
130+
if: github.repository_owner == 'sphinx-doc'
75131
permissions:
76132
contents: write # for softprops/action-gh-release to create GitHub release
77133
steps:
78134
- uses: actions/checkout@v4
135+
with:
136+
persist-credentials: false
79137
- name: Get release version
80138
id: get_version
81139
uses: actions/github-script@v7

0 commit comments

Comments
 (0)