Skip to content

Commit 64e2e61

Browse files
committed
Explicitly use "classic" theme on Sphinx 1.3+
"default" was renamed to "classic" in 1.3; as of 1.3.1, it still points to the same theme but gives a warning (the implication is that "alabaster" will become default in the future). This change ensures consistency going forward and compatibility with older distro packages, unless we decide to depend on another theme.
1 parent caec1fb commit 64e2e61

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/conf.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
DESCRIPTION = 'The Swiss Army Knife of the Bitcoin protocol.'
1717
AUTHORS = 'The python-bitcoinlib developers'
1818

19-
import sys, os
19+
import sphinx
20+
import sys
21+
import os
2022

2123
# If extensions (or modules to document with autodoc) are in another directory,
2224
# add these directories to sys.path here. If the directory is relative to the
@@ -107,7 +109,10 @@
107109

108110
# The theme to use for HTML and HTML Help pages. See the documentation for
109111
# a list of builtin themes.
110-
html_theme = 'default'
112+
if getattr(sphinx, 'version_info', (0, 0)) >= (1, 3):
113+
html_theme = 'classic'
114+
else:
115+
html_theme = 'default'
111116

112117
# Theme options are theme-specific and customize the look and feel of a theme
113118
# further. For a list of options available for each theme, see the

0 commit comments

Comments
 (0)