File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ import json
2+
13extensions = [
24 'notfound.extension' ,
35 'sphinx.ext.extlinks' ,
185187
186188"""
187189
190+ # Dynamically expose the Python version associated with the "main" branch.
191+ with open ("include/release-cycle.json" , encoding = "UTF-8" ) as _f :
192+ _cycle = json .load (_f )
193+ _main_version = next (
194+ ver for ver , data in _cycle .items () if data .get ("branch" ) == "main"
195+ )
196+ rst_prolog += f"\n .. |mainversion| replace:: { _main_version } \n "
197+
188198# sphinx.ext.extlinks
189199# This config is a dictionary of external sites,
190200# mapping unique short aliases to a base URL and a prefix.
Original file line number Diff line number Diff line change 55Status of Python versions
66=========================
77
8- The ``main `` branch is currently the future Python 3.14 , and is the only
8+ The ``main `` branch is currently the future Python | mainversion | , and is the only
99branch that accepts new features. The latest release for each Python
1010version can be found on the `download page <https://www.python.org/downloads/ >`_.
1111
You can’t perform that action at this time.
0 commit comments