Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
90 changes: 56 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,64 @@ If you don't need to build all translations of all branches, add
`--languages en --branches main`.


## Check current version
## Sphinx versions

<!-- [[[cog
from check_versions import check_versions
check_versions("../cpython/")
]]] -->
Sphinx configuration in various branches:

| version | requirements.txt | conf.py |
|-----------|--------------------|----------------------|
| 2.6 | ø | ø |
| 2.7 | ø | ø |
| 3.0 | ø | ø |
| 3.1 | ø | ø |
| 3.2 | ø | ø |
| 3.3 | ø | ø |
| 3.4 | ø | needs_sphinx='1.2' |
| 3.5 | ø | ø |
| 3.6 | ø | ø |
| 3.7 | ø | ø |
| 3.8 | ø | ø |
| 3.9 | sphinx==2.4.4 | needs_sphinx='1.8' |
| 3.10 | sphinx==3.4.3 | needs_sphinx='3.2' |
| 3.11 | sphinx~=7.2.0 | needs_sphinx='4.2' |
| 3.12 | sphinx~=8.2.0 | needs_sphinx='8.2.0' |
| 3.13 | sphinx~=8.2.0 | needs_sphinx='8.2.0' |
| 3.14 | sphinx~=8.2.0 | needs_sphinx='8.2.0' |
| 3.15 | sphinx~=8.2.0 | needs_sphinx='8.2.0' |

Sphinx build as seen on docs.python.org:

| version | el | en | es | fr | bn-in | id | it | ja | ko | pl | pt-br | ro | tr | uk | zh-cn | zh-tw |
|-----------|-------|-------|-------|-------|---------|-------|-------|-------|-------|-------|---------|-------|-------|-------|---------|---------|
| 2.6 | ø | 0.6.5 | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø |
| 2.7 | ø | 2.3.1 | ø | 2.3.1 | ø | 2.3.1 | ø | 2.3.1 | 2.3.1 | ø | 2.3.1 | ø | ø | ø | 2.3.1 | 2.3.1 |
| 3.0 | ø | 0.6 | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø |
| 3.1 | ø | 0.6.5 | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø |
| 3.2 | ø | 1.0.7 | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø |
| 3.3 | ø | 1.2 | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø |
| 3.4 | ø | 1.2.3 | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø | ø |
| 3.5 | ø | 1.8.4 | 1.8.4 | 1.8.4 | ø | 1.8.4 | ø | 1.8.4 | 1.8.4 | 1.8.4 | 1.8.4 | ø | ø | ø | 1.8.4 | 1.8.4 |
| 3.6 | ø | 2.3.1 | 2.3.1 | 2.3.1 | ø | 2.3.1 | ø | 2.3.1 | 2.3.1 | 2.3.1 | 2.3.1 | ø | ø | ø | 2.3.1 | 2.3.1 |
| 3.7 | ø | 2.3.1 | 2.3.1 | 2.3.1 | ø | 2.3.1 | 2.3.1 | 2.3.1 | 2.3.1 | 2.3.1 | 2.3.1 | ø | 2.3.1 | 2.3.1 | 2.3.1 | 2.3.1 |
| 3.8 | ø | 2.4.4 | 2.4.4 | 2.4.4 | ø | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | ø | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 |
| 3.9 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 | ø | 2.4.4 | 2.4.4 | 2.4.4 | 2.4.4 |
| 3.10 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 | ø | 3.4.3 | 3.4.3 | 3.4.3 | 3.4.3 |
| 3.11 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 | ø | 7.2.6 | 7.2.6 | 7.2.6 | 7.2.6 |
| 3.12 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 |
| 3.13 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 |
| 3.14 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 |
| 3.15 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 | 8.2.3 |
<!-- [[[end]]] -->

Install `tools_requirements.txt` then run `python check_versions.py
../cpython/` (pointing to a real CPython clone) to see which version
of Sphinx we're using where:

Sphinx configuration in various branches:

========= ============= ================== ====================
version travis requirements.txt conf.py
========= ============= ================== ====================
2.7 sphinx~=2.0.1 ø needs_sphinx='1.2'
3.5 sphinx==1.8.2 ø needs_sphinx='1.8'
3.6 sphinx==1.8.2 ø needs_sphinx='1.2'
3.7 sphinx==1.8.2 sphinx==2.3.1 needs_sphinx="1.6.6"
3.8 ø sphinx==2.4.4 needs_sphinx='1.8'
3.9 ø sphinx==2.4.4 needs_sphinx='1.8'
3.10 ø sphinx==3.4.3 needs_sphinx='3.2'
3.11 ø sphinx~=7.2.0 needs_sphinx='4.2'
3.12 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
3.13 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
3.14 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
========= ============= ================== ====================

Sphinx build as seen on docs.python.org:

========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
version en es fr id it ja ko pl pt-br tr uk zh-cn zh-tw
========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
3.9 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4
3.10 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3
3.11 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6
3.12 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3
3.13 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3
3.14 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3
========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
../cpython/` (pointing to a real CPython clone) to see which versions
of Sphinx we're using.

Or run `tox -e cog` (with a clone at `../cpython`) to directly update these tables.

## Manually rebuild a branch

Expand Down
15 changes: 9 additions & 6 deletions check_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def find_sphinx_in_files(repo: git.Repo, branch_or_tag, filenames):


CONF_FILES = {
"travis": ".travis.yml",
"requirements.txt": "Doc/requirements.txt",
"conf.py": "Doc/conf.py",
}
Expand All @@ -85,7 +84,7 @@ def search_sphinx_versions_in_cpython(repo: git.Repo):
for version in VERSIONS
]
headers = ["version", *CONF_FILES.keys()]
print(tabulate(table, headers=headers, tablefmt="rst", disable_numparse=True))
print(tabulate(table, headers=headers, tablefmt="github", disable_numparse=True))


async def get_version_in_prod(language: str, version: str) -> str:
Expand Down Expand Up @@ -119,22 +118,26 @@ async def which_sphinx_is_used_in_production():
for version in VERSIONS
]
headers = ["version", *[language.tag for language in LANGUAGES]]
print(tabulate(table, headers=headers, tablefmt="rst", disable_numparse=True))
print(tabulate(table, headers=headers, tablefmt="github", disable_numparse=True))


def main():
def check_versions(cpython_clone: str) -> None:
logging.basicConfig(level=logging.INFO)
logging.getLogger("charset_normalizer").setLevel(logging.WARNING)
logging.getLogger("asyncio").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)
args = parse_args()
repo = git.Repo(args.cpython_clone)
repo = git.Repo(cpython_clone)
print("Sphinx configuration in various branches:", end="\n\n")
search_sphinx_versions_in_cpython(repo)
print()
print("Sphinx build as seen on docs.python.org:", end="\n\n")
asyncio.run(which_sphinx_is_used_in_production())


def main():
args = parse_args()
check_versions(args.cpython_clone)


if __name__ == "__main__":
main()
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
requires =
tox>=4.2
env_list =
cog
lint
py{314, 313}

Expand All @@ -26,6 +27,17 @@ commands =
--cov-report xml \
{posargs}

[testenv:cog]
base_python = python3.13
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use 3.14 yet because one transitive dependency is pydantic, which doesn't yet support 3.14.

They added initial support in pydantic/pydantic#11613 and have released an alpha, but we're waiting for a final release of pydantic 2.12.

skip_install = true
deps =
-r tools_requirements.txt
cog
commands =
cog -Pr README.md
allowlist_externals =
cog

[testenv:lint]
skip_install = true
deps =
Expand Down
Loading