Skip to content

Commit f0eadf5

Browse files
authored
Python Environment: Use latest theme on all sphinx versions
The latest theme version is compatible with all sphinx versions. This should fix readthedocs#8070 In the future, we will want to modify the version number used for old sphinx versions once sphinx 1.x is dropped by the theme. This likely won't happen until `sphinx-rtd-theme 2.0` see readthedocs/sphinx_rtd_theme#1086 I haven't tested this yet, but in the future, this may not be needed at all as we can handle dependency versions within the theme itself.
1 parent ba22f16 commit f0eadf5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

readthedocs/doc_builder/python_environments.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""An abstraction over virtualenv and Conda environments."""
1+
sphinx-rtd-theme"""An abstraction over virtualenv and Conda environments."""
22

33
import codecs
44
import copy
@@ -377,12 +377,15 @@ def install_core_requirements(self):
377377
positive='sphinx',
378378
negative='sphinx<2',
379379
),
380-
# If defaulting to Sphinx 2+, we need to push the latest theme
381-
# release as well. `<0.5.0` is not compatible with Sphinx 2+
380+
# When using sphinx<2 use a theme version that is supported.
381+
# While sphinx-rtd-theme 0.5.2 supports sphinx<2 and sphinx>2,
382+
# support for sphinx<2 will be removed in the future.
383+
# In that case we may need to modify the versions here
384+
# or handle sphinx compatibility in the theme.
382385
self.project.get_feature_value(
383386
Feature.USE_SPHINX_LATEST,
384387
positive='sphinx-rtd-theme',
385-
negative='sphinx-rtd-theme<0.5',
388+
negative='sphinx-rtd-theme<0.6',
386389
),
387390
self.project.get_feature_value(
388391
Feature.USE_SPHINX_RTD_EXT_LATEST,

0 commit comments

Comments
 (0)