Skip to content

Commit ac7d43a

Browse files
authored
Deprecation: remove support for Sphinx 1.x (#10365)
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 27d956a commit ac7d43a

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

readthedocs/doc_builder/python_environments.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -260,27 +260,15 @@ def _install_old_requirements(self, pip_install_cmd):
260260
else:
261261
requirements.extend(
262262
[
263-
self.project.get_feature_value(
264-
Feature.USE_SPHINX_LATEST,
265-
positive="sphinx",
266-
negative="sphinx<2",
267-
),
268-
# If defaulting to Sphinx 2+, we need to push the latest theme
269-
# release as well. `<0.5.0` is not compatible with Sphinx 2+
270-
self.project.get_feature_value(
271-
Feature.USE_SPHINX_LATEST,
272-
positive="sphinx-rtd-theme",
273-
negative="sphinx-rtd-theme<0.5",
274-
),
263+
"sphinx",
264+
"sphinx-rtd-theme",
275265
self.project.get_feature_value(
276266
Feature.USE_SPHINX_RTD_EXT_LATEST,
277267
positive="readthedocs-sphinx-ext",
278268
negative="readthedocs-sphinx-ext<2.3",
279269
),
280270
]
281271
)
282-
if not self.project.has_feature(Feature.USE_SPHINX_LATEST):
283-
requirements.extend(["jinja2<3.1.0"])
284272

285273
cmd = copy.copy(pip_install_cmd)
286274
cmd.extend(requirements)

readthedocs/projects/models.py

-2
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,6 @@ def add_features(sender, **kwargs):
18911891
PIP_ALWAYS_UPGRADE = 'pip_always_upgrade'
18921892
USE_NEW_PIP_RESOLVER = 'use_new_pip_resolver'
18931893
DONT_INSTALL_LATEST_PIP = 'dont_install_latest_pip'
1894-
USE_SPHINX_LATEST = 'use_sphinx_latest'
18951894
USE_SPHINX_RTD_EXT_LATEST = 'rtd_sphinx_ext_latest'
18961895
INSTALL_LATEST_CORE_REQUIREMENTS = "install_latest_core_requirements"
18971896

@@ -1997,7 +1996,6 @@ def add_features(sender, **kwargs):
19971996
DONT_INSTALL_LATEST_PIP,
19981997
_("Build: Don't install the latest version of pip"),
19991998
),
2000-
(USE_SPHINX_LATEST, _("Sphinx: Use latest version of Sphinx")),
20011999
(
20022000
USE_SPHINX_RTD_EXT_LATEST,
20032001
_("Sphinx: Use latest version of the Read the Docs Sphinx extension"),

readthedocs/projects/tests/test_build_tasks.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,9 @@ def test_build_commands_executed(
775775
"alabaster>=0.7,<0.8,!=0.7.5",
776776
"commonmark==0.9.1",
777777
"recommonmark==0.5.0",
778-
"sphinx<2",
779-
"sphinx-rtd-theme<0.5",
778+
"sphinx",
779+
"sphinx-rtd-theme",
780780
"readthedocs-sphinx-ext<2.3",
781-
"jinja2<3.1.0",
782781
bin_path=mock.ANY,
783782
cwd=mock.ANY,
784783
),

readthedocs/rtd_tests/tests/test_doc_building.py

-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ def test_install_core_requirements_sphinx(self, checkout_path):
437437
"sphinx",
438438
"sphinx-rtd-theme",
439439
"readthedocs-sphinx-ext",
440-
"jinja2<3.1.0",
441440
]
442441

443442
self.assertEqual(self.build_env_mock.run.call_count, 2)

0 commit comments

Comments
 (0)