Skip to content

Commit d59be69

Browse files
committed
Sphinx: don't override html_context by default
We have this feature enabled on .org and .com, we haven't heard any complaints. Closes #10293
1 parent 926add8 commit d59be69

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

docs/user/feature-flags.rst

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Available flags
1717
Makes Read the Docs to install all the requirements at once on ``conda create`` step.
1818
This helps users to pin dependencies on conda and to improve build time.
1919

20-
``DONT_OVERWRITE_SPHINX_CONTEXT``: Do not overwrite context vars in conf.py with Read the Docs context.
21-
2220
``DONT_CREATE_INDEX``: Do not create index.md or README.rst if the project does not have one.
2321

2422
When Read the Docs detects that your project doesn't have an ``index.md`` or ``README.rst``,

readthedocs/doc_builder/backends/sphinx.py

-3
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,6 @@ def get_config_params(self):
258258
'display_gitlab': display_gitlab,
259259

260260
# Features
261-
'dont_overwrite_sphinx_context': self.project.has_feature(
262-
Feature.DONT_OVERWRITE_SPHINX_CONTEXT,
263-
),
264261
"docsearch_disabled": self.project.has_feature(
265262
Feature.DISABLE_SERVER_SIDE_SEARCH
266263
),

readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl

-4
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,9 @@ if version_info >= (1, 8):
160160
{% block extra_context %}{% endblock %}
161161

162162
if 'html_context' in globals():
163-
{% if dont_overwrite_sphinx_context %}
164163
for key in context:
165164
if key not in html_context:
166165
html_context[key] = context[key]
167-
{% else %}
168-
html_context.update(context)
169-
{% endif %}
170166
else:
171167
html_context = context
172168

readthedocs/projects/models.py

-7
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,6 @@ def add_features(sender, **kwargs):
18621862
# Feature constants - this is not a exhaustive list of features, features
18631863
# may be added by other packages
18641864
ALLOW_DEPRECATED_WEBHOOKS = "allow_deprecated_webhooks"
1865-
DONT_OVERWRITE_SPHINX_CONTEXT = "dont_overwrite_sphinx_context"
18661865
SKIP_SPHINX_HTML_THEME_PATH = "skip_sphinx_html_theme_path"
18671866
MKDOCS_THEME_RTD = "mkdocs_theme_rtd"
18681867
API_LARGE_DATA = "api_large_data"
@@ -1915,12 +1914,6 @@ def add_features(sender, **kwargs):
19151914

19161915
FEATURES = (
19171916
(ALLOW_DEPRECATED_WEBHOOKS, _("Webhook: Allow deprecated webhook views")),
1918-
(
1919-
DONT_OVERWRITE_SPHINX_CONTEXT,
1920-
_(
1921-
"Sphinx: Do not overwrite context vars in conf.py with Read the Docs context",
1922-
),
1923-
),
19241917
(
19251918
SKIP_SPHINX_HTML_THEME_PATH,
19261919
_(

0 commit comments

Comments
 (0)