Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc08754f

Browse files
authored
Addtox -e cog to update README tables (#313)
1 parent7787668 commitc08754f

File tree

3 files changed

+76
-40
lines changed

3 files changed

+76
-40
lines changed

‎README.md‎

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,64 @@ If you don't need to build all translations of all branches, add
2020
`--languages en --branches main`.
2121

2222

23-
##Check current version
23+
##Sphinx versions
24+
25+
<!-- [[[cog
26+
from check_versions import check_versions
27+
check_versions("../cpython/")
28+
]]]-->
29+
Sphinx configuration in various branches:
30+
31+
| version| requirements.txt| conf.py|
32+
|-----------|--------------------|----------------------|
33+
| 2.6| ø| ø|
34+
| 2.7| ø| ø|
35+
| 3.0| ø| ø|
36+
| 3.1| ø| ø|
37+
| 3.2| ø| ø|
38+
| 3.3| ø| ø|
39+
| 3.4| ø| needs_sphinx='1.2'|
40+
| 3.5| ø| ø|
41+
| 3.6| ø| ø|
42+
| 3.7| ø| ø|
43+
| 3.8| ø| ø|
44+
| 3.9| sphinx==2.4.4| needs_sphinx='1.8'|
45+
| 3.10| sphinx==3.4.3| needs_sphinx='3.2'|
46+
| 3.11| sphinx~=7.2.0| needs_sphinx='4.2'|
47+
| 3.12| sphinx~=8.2.0| needs_sphinx='8.2.0'|
48+
| 3.13| sphinx~=8.2.0| needs_sphinx='8.2.0'|
49+
| 3.14| sphinx~=8.2.0| needs_sphinx='8.2.0'|
50+
| 3.15| sphinx~=8.2.0| needs_sphinx='8.2.0'|
51+
52+
Sphinx build as seen on docs.python.org:
53+
54+
| version| el| en| es| fr| bn-in| id| it| ja| ko| pl| pt-br| ro| tr| uk| zh-cn| zh-tw|
55+
|-----------|-------|-------|-------|-------|---------|-------|-------|-------|-------|-------|---------|-------|-------|-------|---------|---------|
56+
| 2.6| ø| 0.6.5| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø|
57+
| 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|
58+
| 3.0| ø| 0.6| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø|
59+
| 3.1| ø| 0.6.5| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø|
60+
| 3.2| ø| 1.0.7| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø|
61+
| 3.3| ø| 1.2| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø|
62+
| 3.4| ø| 1.2.3| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø| ø|
63+
| 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|
64+
| 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|
65+
| 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|
66+
| 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|
67+
| 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| 2.4.4|
68+
| 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.4.3|
69+
| 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| 7.2.6|
70+
| 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|
71+
| 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|
72+
| 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|
73+
| 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|
74+
<!-- [[[end]]]-->
2475

2576
Install`tools_requirements.txt` then run `python check_versions.py
26-
../cpython/` (pointing to a real CPython clone) to see which version
27-
of Sphinx we're using where:
28-
29-
Sphinx configuration in various branches:
30-
31-
========= ============= ================== ====================
32-
version travis requirements.txt conf.py
33-
========= ============= ================== ====================
34-
2.7 sphinx~=2.0.1 ø needs_sphinx='1.2'
35-
3.5 sphinx==1.8.2 ø needs_sphinx='1.8'
36-
3.6 sphinx==1.8.2 ø needs_sphinx='1.2'
37-
3.7 sphinx==1.8.2 sphinx==2.3.1 needs_sphinx="1.6.6"
38-
3.8 ø sphinx==2.4.4 needs_sphinx='1.8'
39-
3.9 ø sphinx==2.4.4 needs_sphinx='1.8'
40-
3.10 ø sphinx==3.4.3 needs_sphinx='3.2'
41-
3.11 ø sphinx~=7.2.0 needs_sphinx='4.2'
42-
3.12 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
43-
3.13 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
44-
3.14 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
45-
========= ============= ================== ====================
46-
47-
Sphinx build as seen on docs.python.org:
48-
49-
========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
50-
version en es fr id it ja ko pl pt-br tr uk zh-cn zh-tw
51-
========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
52-
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
53-
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
54-
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
55-
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
56-
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
57-
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
58-
========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
77+
../cpython/` (pointing to a real CPython clone) to see which versions
78+
of Sphinx we're using.
79+
80+
Or run`tox -e cog` (with a clone at`../cpython`) to directly update these tables.
5981

6082
##Manually rebuild a branch
6183

‎check_versions.py‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def find_sphinx_in_files(repo: git.Repo, branch_or_tag, filenames):
6262

6363

6464
CONF_FILES= {
65-
"travis":".travis.yml",
6665
"requirements.txt":"Doc/requirements.txt",
6766
"conf.py":"Doc/conf.py",
6867
}
@@ -85,7 +84,7 @@ def search_sphinx_versions_in_cpython(repo: git.Repo):
8584
forversioninVERSIONS
8685
]
8786
headers= ["version",*CONF_FILES.keys()]
88-
print(tabulate(table,headers=headers,tablefmt="rst",disable_numparse=True))
87+
print(tabulate(table,headers=headers,tablefmt="github",disable_numparse=True))
8988

9089

9190
asyncdefget_version_in_prod(language:str,version:str)->str:
@@ -119,22 +118,26 @@ async def which_sphinx_is_used_in_production():
119118
forversioninVERSIONS
120119
]
121120
headers= ["version",*[language.tagforlanguageinLANGUAGES]]
122-
print(tabulate(table,headers=headers,tablefmt="rst",disable_numparse=True))
121+
print(tabulate(table,headers=headers,tablefmt="github",disable_numparse=True))
123122

124123

125-
defmain():
124+
defcheck_versions(cpython_clone:str)->None:
126125
logging.basicConfig(level=logging.INFO)
127126
logging.getLogger("charset_normalizer").setLevel(logging.WARNING)
128127
logging.getLogger("asyncio").setLevel(logging.WARNING)
129128
logging.getLogger("httpx").setLevel(logging.WARNING)
130-
args=parse_args()
131-
repo=git.Repo(args.cpython_clone)
129+
repo=git.Repo(cpython_clone)
132130
print("Sphinx configuration in various branches:",end="\n\n")
133131
search_sphinx_versions_in_cpython(repo)
134132
print()
135133
print("Sphinx build as seen on docs.python.org:",end="\n\n")
136134
asyncio.run(which_sphinx_is_used_in_production())
137135

138136

137+
defmain():
138+
args=parse_args()
139+
check_versions(args.cpython_clone)
140+
141+
139142
if__name__=="__main__":
140143
main()

‎tox.ini‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
requires =
33
tox>=4.2
44
env_list =
5+
cog
56
lint
67
py{314, 313}
78

@@ -26,6 +27,16 @@ commands =
2627
--cov-report xml \
2728
{posargs}
2829

30+
[testenv:cog]
31+
base_python = python3.13
32+
skip_install = true
33+
deps =
34+
-r requirements.txt
35+
-r tools_requirements.txt
36+
cogapp
37+
commands =
38+
cog -Pr README.md
39+
2940
[testenv:lint]
3041
skip_install = true
3142
deps =

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp