Skip to content

Commit ba370fc

Browse files
authored
Merge pull request #5505 from stsewd/update-mkdocs
Update mkdocs
2 parents 5f78337 + d8bdd4c commit ba370fc

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

readthedocs/doc_builder/backends/mkdocs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""
42
MkDocs_ backend for building docs.
53
64
.. _MkDocs: http://www.mkdocs.org/
75
"""
6+
87
import json
98
import logging
109
import os

readthedocs/doc_builder/python_environments.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""An abstraction over virtualenv and Conda environments."""
42

53
import copy
@@ -9,8 +7,6 @@
97
import os
108
import shutil
119

12-
from django.conf import settings
13-
1410
from readthedocs.config import PIP, SETUPTOOLS
1511
from readthedocs.config.models import PythonInstall, PythonInstallRequirements
1612
from readthedocs.doc_builder.config import load_yaml_config
@@ -295,7 +291,13 @@ def install_core_requirements(self):
295291
]
296292

297293
if self.config.doctype == 'mkdocs':
298-
requirements.append('mkdocs==0.17.3')
294+
requirements.append(
295+
self.project.get_feature_value(
296+
Feature.DEFAULT_TO_MKDOCS_0_17_3,
297+
positive='mkdocs==0.17.3',
298+
negative='mkdocs<1.1',
299+
),
300+
)
299301
else:
300302
# We will assume semver here and only automate up to the next
301303
# backward incompatible release: 2.x

readthedocs/projects/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,7 @@ def add_features(sender, **kwargs):
13121312
USE_TESTING_BUILD_IMAGE = 'use_testing_build_image'
13131313
SHARE_SPHINX_DOCTREE = 'share_sphinx_doctree'
13141314
USE_PDF_LATEXMK = 'use_pdf_latexmk'
1315+
DEFAULT_TO_MKDOCS_0_17_3 = 'default_to_mkdocs_0_17_3'
13151316

13161317
FEATURES = (
13171318
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
@@ -1346,6 +1347,10 @@ def add_features(sender, **kwargs):
13461347
SHARE_SPHINX_DOCTREE,
13471348
_('Use shared directory for doctrees'),
13481349
),
1350+
(
1351+
DEFAULT_TO_MKDOCS_0_17_3,
1352+
_('Install mkdocs 0.17.3 by default')
1353+
),
13491354
)
13501355

13511356
projects = models.ManyToManyField(

0 commit comments

Comments
 (0)