From c5e1bce51ffd0c8301bbbce357e31d8186991f7f Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Mon, 25 Jan 2021 18:54:40 -0500 Subject: [PATCH 1/2] Install latest mkdocs by default as we do with sphinx --- readthedocs/doc_builder/python_environments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py index f470966a15f..6ea25ec8fb4 100644 --- a/readthedocs/doc_builder/python_environments.py +++ b/readthedocs/doc_builder/python_environments.py @@ -374,7 +374,7 @@ def install_core_requirements(self): self.project.get_feature_value( Feature.DEFAULT_TO_MKDOCS_0_17_3, positive='mkdocs==0.17.3', - negative='mkdocs<1.1', + negative='mkdocs', ), ) else: From 3e6d89e96b97a1a83a49ad232f5a326617c5edee Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 26 Jan 2021 10:36:46 -0500 Subject: [PATCH 2/2] Use feature flag --- readthedocs/doc_builder/python_environments.py | 6 +++++- readthedocs/projects/models.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py index 6ea25ec8fb4..645048c7c48 100644 --- a/readthedocs/doc_builder/python_environments.py +++ b/readthedocs/doc_builder/python_environments.py @@ -374,7 +374,11 @@ def install_core_requirements(self): self.project.get_feature_value( Feature.DEFAULT_TO_MKDOCS_0_17_3, positive='mkdocs==0.17.3', - negative='mkdocs', + negative=self.project.get_feature_value( + Feature.USE_MKDOCS_LATEST, + positive='mkdocs<1.1', + negative='mkdocs', + ), ), ) else: diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 642d9304a76..7ac3a475ea1 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1592,6 +1592,7 @@ def add_features(sender, **kwargs): USE_SPHINX_LATEST = 'use_sphinx_latest' DONT_INSTALL_DOCUTILS = 'dont_install_docutils' DEFAULT_TO_MKDOCS_0_17_3 = 'default_to_mkdocs_0_17_3' + USE_MKDOCS_LATEST = 'use_mkdocs_latest' USE_SPHINX_RTD_EXT_LATEST = 'rtd_sphinx_ext_latest' INSTALL_LATEST_SETUPTOOLS = 'install_latest_setuptoold' @@ -1707,6 +1708,7 @@ def add_features(sender, **kwargs): DEFAULT_TO_MKDOCS_0_17_3, _('Install mkdocs 0.17.3 by default'), ), + (USE_MKDOCS_LATEST, _('Use latest version of MkDocs')), ( USE_SPHINX_RTD_EXT_LATEST, _('Use latest version of the Read the Docs Sphinx extension'),