Skip to content

Commit 8be9248

Browse files
committed
Deprecation: remove support for Sphinx 1.x
We are installing Sphinx 1.x based on a feature flag. There are around 900 projects still using 1.x, based on https://ethicalads.metabaseapp.com/question/250-projects-using-sphinx-timeserie Note this feature flag is enabled by default for new projects starting on Oct. 20, 2020 We may need to send them an email about this and informing them how to create a `requirements.txt` file to pin their dependencies. I don't think that the migration to a config file v2 would enforce them to pin Sphinx. Related #10342
1 parent 9137e90 commit 8be9248

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

readthedocs/doc_builder/python_environments.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -219,27 +219,15 @@ def install_core_requirements(self):
219219
else:
220220
requirements.extend(
221221
[
222-
self.project.get_feature_value(
223-
Feature.USE_SPHINX_LATEST,
224-
positive="sphinx",
225-
negative="sphinx<2",
226-
),
227-
# If defaulting to Sphinx 2+, we need to push the latest theme
228-
# release as well. `<0.5.0` is not compatible with Sphinx 2+
229-
self.project.get_feature_value(
230-
Feature.USE_SPHINX_LATEST,
231-
positive="sphinx-rtd-theme",
232-
negative="sphinx-rtd-theme<0.5",
233-
),
222+
"sphinx",
223+
"sphinx-rtd-theme",
234224
self.project.get_feature_value(
235225
Feature.USE_SPHINX_RTD_EXT_LATEST,
236226
positive="readthedocs-sphinx-ext",
237227
negative="readthedocs-sphinx-ext<2.3",
238228
),
239229
]
240230
)
241-
if not self.project.has_feature(Feature.USE_SPHINX_LATEST):
242-
requirements.extend(["jinja2<3.1.0"])
243231

244232
cmd = copy.copy(pip_install_cmd)
245233
if self.config.python.use_system_site_packages:

readthedocs/projects/models.py

-2
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,6 @@ def add_features(sender, **kwargs):
18951895
PIP_ALWAYS_UPGRADE = 'pip_always_upgrade'
18961896
USE_NEW_PIP_RESOLVER = 'use_new_pip_resolver'
18971897
DONT_INSTALL_LATEST_PIP = 'dont_install_latest_pip'
1898-
USE_SPHINX_LATEST = 'use_sphinx_latest'
18991898
DEFAULT_TO_MKDOCS_0_17_3 = 'default_to_mkdocs_0_17_3'
19001899
USE_MKDOCS_LATEST = 'use_mkdocs_latest'
19011900
USE_SPHINX_RTD_EXT_LATEST = 'rtd_sphinx_ext_latest'
@@ -2034,7 +2033,6 @@ def add_features(sender, **kwargs):
20342033
DONT_INSTALL_LATEST_PIP,
20352034
_("Build: Don't install the latest version of pip"),
20362035
),
2037-
(USE_SPHINX_LATEST, _("Sphinx: Use latest version of Sphinx")),
20382036
(
20392037
DEFAULT_TO_MKDOCS_0_17_3,
20402038
_("MkDOcs: Install mkdocs 0.17.3 by default"),

readthedocs/projects/tests/test_build_tasks.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,9 @@ def test_build_commands_executed(
726726
"alabaster>=0.7,<0.8,!=0.7.5",
727727
"commonmark==0.9.1",
728728
"recommonmark==0.5.0",
729-
"sphinx<2",
730-
"sphinx-rtd-theme<0.5",
729+
"sphinx",
730+
"sphinx-rtd-theme",
731731
"readthedocs-sphinx-ext<2.3",
732-
"jinja2<3.1.0",
733732
bin_path=mock.ANY,
734733
cwd=mock.ANY,
735734
),

readthedocs/rtd_tests/tests/test_doc_building.py

-2
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ def test_install_core_requirements_sphinx(self, checkout_path):
412412
"sphinx",
413413
"sphinx-rtd-theme",
414414
"readthedocs-sphinx-ext",
415-
"jinja2<3.1.0",
416415
]
417416

418417
self.assertEqual(self.build_env_mock.run.call_count, 2)
@@ -450,7 +449,6 @@ def test_install_core_requirements_sphinx_system_packages_caps_setuptools(self,
450449
"sphinx",
451450
"sphinx-rtd-theme",
452451
"readthedocs-sphinx-ext",
453-
"jinja2<3.1.0",
454452
"setuptools",
455453
]
456454

0 commit comments

Comments
 (0)