diff --git a/docs/user/feature-flags.rst b/docs/user/feature-flags.rst index d40a9994cac..732cf76274c 100644 --- a/docs/user/feature-flags.rst +++ b/docs/user/feature-flags.rst @@ -17,8 +17,6 @@ Available flags Makes Read the Docs to install all the requirements at once on ``conda create`` step. This helps users to pin dependencies on conda and to improve build time. -``DONT_OVERWRITE_SPHINX_CONTEXT``: Do not overwrite context vars in conf.py with Read the Docs context. - ``DONT_CREATE_INDEX``: Do not create index.md or README.rst if the project does not have one. When Read the Docs detects that your project doesn't have an ``index.md`` or ``README.rst``, diff --git a/readthedocs/doc_builder/backends/sphinx.py b/readthedocs/doc_builder/backends/sphinx.py index 43778e31441..aaf57009202 100644 --- a/readthedocs/doc_builder/backends/sphinx.py +++ b/readthedocs/doc_builder/backends/sphinx.py @@ -258,9 +258,6 @@ def get_config_params(self): 'display_gitlab': display_gitlab, # Features - 'dont_overwrite_sphinx_context': self.project.has_feature( - Feature.DONT_OVERWRITE_SPHINX_CONTEXT, - ), "docsearch_disabled": self.project.has_feature( Feature.DISABLE_SERVER_SIDE_SEARCH ), diff --git a/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl b/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl index 285adf0de46..2884c604840 100644 --- a/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl +++ b/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl @@ -160,13 +160,9 @@ if version_info >= (1, 8): {% block extra_context %}{% endblock %} if 'html_context' in globals(): - {% if dont_overwrite_sphinx_context %} for key in context: if key not in html_context: html_context[key] = context[key] - {% else %} - html_context.update(context) - {% endif %} else: html_context = context diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 186c31c49cc..1c198c20158 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1862,7 +1862,6 @@ def add_features(sender, **kwargs): # Feature constants - this is not a exhaustive list of features, features # may be added by other packages ALLOW_DEPRECATED_WEBHOOKS = "allow_deprecated_webhooks" - DONT_OVERWRITE_SPHINX_CONTEXT = "dont_overwrite_sphinx_context" SKIP_SPHINX_HTML_THEME_PATH = "skip_sphinx_html_theme_path" MKDOCS_THEME_RTD = "mkdocs_theme_rtd" API_LARGE_DATA = "api_large_data" @@ -1915,12 +1914,6 @@ def add_features(sender, **kwargs): FEATURES = ( (ALLOW_DEPRECATED_WEBHOOKS, _("Webhook: Allow deprecated webhook views")), - ( - DONT_OVERWRITE_SPHINX_CONTEXT, - _( - "Sphinx: Do not overwrite context vars in conf.py with Read the Docs context", - ), - ), ( SKIP_SPHINX_HTML_THEME_PATH, _(