You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tries to clarify a few points:
- We have altered more dependencies than just Sphinx/Mkdocs
- Explain the actual changes to dependencies a bit clearer and more explicitly
- Mention some of the errors that are possible so that search can pick up on this
We are announcing the deprecation of building with older documentation tool versions by default.
10
+
.. note::
11
11
12
-
Historically, Read the Docs installed a specific version based on the date your project was created.
12
+
This post was updated on Oct 10 to reflect all of the changes to installed dependencies
13
+
14
+
We are announcing the deprecation of automatic installation of several key project dependencies,
15
+
and builds will no longer install older documentation tool versions by default.
16
+
17
+
Historically, Read the Docs installed a specific version of several dependencies based on the date your project was created.
13
18
This caused odd issues where reimporting a project could change behavior, and caused users to continue using very old versions of build tools that weren't supported by their authors.
14
19
This was done to maintain backwards compatibility,
15
20
but our platform now has robust support for defining a build environment,
16
21
so we encourage you to pin your dependencies instead.
17
22
18
-
**Starting on October 3rd Read the Docs will install the latest available version of MkDocs and Sphinx by default**.
19
-
We are also not going to be installing other build dependencies, like ``mock`` and ``recommonmark``.
20
-
If you want to use a different version, you can do this by pinning your dependencies.
23
+
**Starting on October 3rd default dependencies installed for each project build will change.**
24
+
If your project was previously depending on these default dependencies,
25
+
your project's builds may encounter errors or failures due to missing packages.
26
+
27
+
To resolve these build failures we recommend defining all of your project's dependencies.
28
+
See the examples below for guidance on how to update your project configuration
29
+
or learn more about managing dependencies in our `guide for reproducible builds <https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html>`_.
30
+
31
+
The changes to default dependencies installed during the build process are:
32
+
33
+
.. list-table::
34
+
:header-rows: 1
35
+
:width: 100%
36
+
:align: center
37
+
:widths: 10, 5, 5
38
+
39
+
- * Package
40
+
* Prior version
41
+
* New version
42
+
- * Sphinx
43
+
* ``1.8.5``
44
+
* *Latest release*
45
+
- * MkDocs
46
+
* ``0.17.3``
47
+
* *Latest release*
48
+
- * ``sphinx-rtd-theme``
49
+
* *Latest release*
50
+
* *Not installed*
51
+
- * ``recommonmark``
52
+
* *Latest release*
53
+
* *Not installed*
54
+
- * ``commonmark``
55
+
* *Latest release*
56
+
* *Not installed*
57
+
- * ``pillow``
58
+
* *Latest release*
59
+
* *Not installed*
60
+
- * ``mock``
61
+
* *Latest release*
62
+
* *Not installed*
21
63
22
64
Sphinx example
23
65
--------------
24
66
25
-
Previously we were installing ``Sphinx 1.8``,
26
-
which is no longer supported.
27
-
You should pin a specific version so that your documentation builds are reproducible.
67
+
If your project uses Sphinx to build its documentation,
68
+
you will need to install Sphinx and may need to install the ``sphinx-rtd-theme`` package.
69
+
Previously, Sphinx version ``1.8.5`` could have been the default version installed for your project,
70
+
which we do not recommend installing as it is no longer supported.
28
71
29
-
Example ``.readthedocs.yaml`` configuration file:
72
+
A basic configuration example to work from would include the following files:
30
73
31
74
.. code-block:: yaml
75
+
:caption: .readthedocs.yaml
32
76
33
77
version: 2
34
78
@@ -42,7 +86,8 @@ Example ``.readthedocs.yaml`` configuration file:
42
86
install:
43
87
- requirements: docs/requirements.txt
44
88
45
-
The content of ``docs/requirements.txt`` would be similar to::
89
+
.. code-block::
90
+
:caption: docs/requirements.txt
46
91
47
92
sphinx==6.2.1
48
93
sphinx-rtd-theme==1.2.2
@@ -51,16 +96,16 @@ The content of ``docs/requirements.txt`` would be similar to::
51
96
commonmark==0.9.1
52
97
recommonmark==0.5.0
53
98
54
-
Mkdocs example
99
+
MkDocs example
55
100
--------------
56
101
57
-
Previously we were installing ``Mkdocs 0.17.3``,
58
-
which is no longer supported.
59
-
You should pin a specific version so that your documentation builds are reproducible.
102
+
If your project uses MkDocs to build its documentation,
103
+
you will need to find the latest version of MkDocs that your project can use.
60
104
61
-
Example ``.readthedocs.yaml`` configuration file:
105
+
A basic configuration example to work from would include the following files:
62
106
63
107
.. code-block:: yaml
108
+
:caption: .readthedocs.yaml
64
109
65
110
version: 2
66
111
@@ -74,14 +119,23 @@ Example ``.readthedocs.yaml`` configuration file:
74
119
install:
75
120
- requirements: docs/requirements.txt
76
121
77
-
The content of ``docs/requirements.txt`` would be similar to::
122
+
.. code-block::
123
+
:caption: docs/requirements.txt
78
124
79
125
mkdocs==1.5.1
80
126
81
-
Reproducible builds
82
-
-------------------
83
127
84
-
We highly recommend pinning your dependencies so that you can ensure a working build environment across time and on different build servers.
128
+
.. This section is mostly to direct search results
129
+
130
+
Build errors
131
+
------------
132
+
133
+
Some of the errors you might encounter are from missing dependencies:
134
+
135
+
- ``ModuleNotFoundError: No module named 'sphinx_rtd_theme'``
136
+
- ``ModuleNotFoundError: No module named 'recommonmark'``
85
137
86
-
You can learn more about this in our `reproducible builds <https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html>`_ guide.
138
+
Or you might notice errors from backwards incompatible API changes on modern
139
+
releases of Sphinx, ``docutils``, and other packages:
87
140
141
+
- ``AttributeError: 'Module' object has no attribute 'doc'``
0 commit comments