Skip to content

Commit 26973bf

Browse files
authored
Update blog post for default dependencies (#243)
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
1 parent bf07046 commit 26973bf

File tree

1 file changed

+76
-22
lines changed

1 file changed

+76
-22
lines changed

defaulting-latest-build-tools.rst

+76-22
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,75 @@
44
:location: BCN
55
:category: Changelog
66

7-
Enabling latest versions for Sphinx & Mkdocs builds
8-
===================================================
7+
Changes to default project dependencies
8+
=======================================
99

10-
We are announcing the deprecation of building with older documentation tool versions by default.
10+
.. note::
1111

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.
1318
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.
1419
This was done to maintain backwards compatibility,
1520
but our platform now has robust support for defining a build environment,
1621
so we encourage you to pin your dependencies instead.
1722

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*
2163

2264
Sphinx example
2365
--------------
2466

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.
2871

29-
Example ``.readthedocs.yaml`` configuration file:
72+
A basic configuration example to work from would include the following files:
3073

3174
.. code-block:: yaml
75+
:caption: .readthedocs.yaml
3276
3377
version: 2
3478
@@ -42,7 +86,8 @@ Example ``.readthedocs.yaml`` configuration file:
4286
install:
4387
- requirements: docs/requirements.txt
4488
45-
The content of ``docs/requirements.txt`` would be similar to::
89+
.. code-block::
90+
:caption: docs/requirements.txt
4691
4792
sphinx==6.2.1
4893
sphinx-rtd-theme==1.2.2
@@ -51,16 +96,16 @@ The content of ``docs/requirements.txt`` would be similar to::
5196
commonmark==0.9.1
5297
recommonmark==0.5.0
5398
54-
Mkdocs example
99+
MkDocs example
55100
--------------
56101

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.
60104

61-
Example ``.readthedocs.yaml`` configuration file:
105+
A basic configuration example to work from would include the following files:
62106

63107
.. code-block:: yaml
108+
:caption: .readthedocs.yaml
64109
65110
version: 2
66111
@@ -74,14 +119,23 @@ Example ``.readthedocs.yaml`` configuration file:
74119
install:
75120
- requirements: docs/requirements.txt
76121
77-
The content of ``docs/requirements.txt`` would be similar to::
122+
.. code-block::
123+
:caption: docs/requirements.txt
78124
79125
mkdocs==1.5.1
80126
81-
Reproducible builds
82-
-------------------
83127
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'``
85137

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:
87140

141+
- ``AttributeError: 'Module' object has no attribute 'doc'``

0 commit comments

Comments
 (0)