Skip to content

Commit f9b4636

Browse files
committed
Feature flag: remove USE_SPHINX_BUILDERS
We can safely remove this feature flag since it's marked as `default_true=True` and `future_default_true=True` in both platforms. This means that it applies to all the projects.
1 parent 4173609 commit f9b4636

File tree

3 files changed

+3
-40
lines changed

3 files changed

+3
-40
lines changed

readthedocs/doc_builder/backends/sphinx.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -370,27 +370,21 @@ class HtmlBuilder(BaseSphinx):
370370

371371
def __init__(self, *args, **kwargs):
372372
super().__init__(*args, **kwargs)
373-
self.sphinx_builder = 'readthedocs'
374-
if self.project.has_feature(Feature.USE_SPHINX_BUILDERS):
375-
self.sphinx_builder = 'html'
373+
self.sphinx_builder = "html"
376374

377375

378376
class HtmlDirBuilder(HtmlBuilder):
379377

380378
def __init__(self, *args, **kwargs):
381379
super().__init__(*args, **kwargs)
382-
self.sphinx_builder = 'readthedocsdirhtml'
383-
if self.project.has_feature(Feature.USE_SPHINX_BUILDERS):
384-
self.sphinx_builder = 'dirhtml'
380+
self.sphinx_builder = "dirhtml"
385381

386382

387383
class SingleHtmlBuilder(HtmlBuilder):
388384

389385
def __init__(self, *args, **kwargs):
390386
super().__init__(*args, **kwargs)
391-
self.sphinx_builder = 'readthedocssinglehtml'
392-
if self.project.has_feature(Feature.USE_SPHINX_BUILDERS):
393-
self.sphinx_builder = 'singlehtml'
387+
self.sphinx_builder = "singlehtml"
394388

395389

396390
class LocalMediaBuilder(BaseSphinx):

readthedocs/projects/models.py

-5
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,6 @@ def add_features(sender, **kwargs):
19441944
LIST_PACKAGES_INSTALLED_ENV = "list_packages_installed_env"
19451945
VCS_REMOTE_LISTING = "vcs_remote_listing"
19461946
SPHINX_PARALLEL = "sphinx_parallel"
1947-
USE_SPHINX_BUILDERS = "use_sphinx_builders"
19481947
CANCEL_OLD_BUILDS = "cancel_old_builds"
19491948
DONT_CREATE_INDEX = "dont_create_index"
19501949
USE_RCLONE = "use_rclone"
@@ -2112,10 +2111,6 @@ def add_features(sender, **kwargs):
21122111
SPHINX_PARALLEL,
21132112
_('Sphinx: Use "-j auto" when calling sphinx-build'),
21142113
),
2115-
(
2116-
USE_SPHINX_BUILDERS,
2117-
_("Sphinx: Use regular sphinx builders instead of custom RTD builders"),
2118-
),
21192114
(
21202115
CANCEL_OLD_BUILDS,
21212116
_(

readthedocs/rtd_tests/tests/test_doc_builder.py

-26
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,6 @@ def test_multiple_conf_py(
263263

264264
@mock.patch('readthedocs.doc_builder.config.load_config')
265265
def test_use_sphinx_builders(self, load_config):
266-
feature = get(
267-
Feature,
268-
feature_id=Feature.USE_SPHINX_BUILDERS,
269-
)
270-
271266
config_data = {'version': 2, 'sphinx': {'configuration': 'docs/conf.py'}}
272267
load_config.side_effect = create_load(config_data)
273268
config = load_yaml_config(self.version)
@@ -277,27 +272,6 @@ def test_use_sphinx_builders(self, load_config):
277272
build_env=self.build_env,
278273
config=config,
279274
)
280-
builder = HtmlBuilder(
281-
build_env=self.build_env,
282-
python_env=python_env,
283-
)
284-
self.assertEqual(builder.sphinx_builder, 'readthedocs')
285-
286-
builder = HtmlDirBuilder(
287-
build_env=self.build_env,
288-
python_env=python_env,
289-
)
290-
self.assertEqual(builder.sphinx_builder, 'readthedocsdirhtml')
291-
292-
builder = SingleHtmlBuilder(
293-
build_env=self.build_env,
294-
python_env=python_env,
295-
)
296-
self.assertEqual(builder.sphinx_builder, 'readthedocssinglehtml')
297-
298-
# Add the feature to use the regular builders
299-
feature.projects.add(self.project)
300-
301275
builder = HtmlBuilder(
302276
build_env=self.build_env,
303277
python_env=python_env,

0 commit comments

Comments
 (0)