<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://blog.readthedocs.com</id>
  <title>Read the Docs Blog - Posts tagged sphinx</title>
  <updated>2023-07-08T10:50:30.420415+00:00</updated>
  <link href="https://blog.readthedocs.com"/>
  <link href="https://blog.readthedocs.com/archive/tag/sphinx/atom.xml" rel="self"/>
  <generator uri="https://ablog.readthedocs.org/" version="0.10.26">ABlog</generator>
  <entry>
    <id>https://blog.readthedocs.com/sphinx6-upgrade/</id>
    <title>Sphinx 6 is out and has important breaking changes</title>
    <updated>2023-01-04T00:00:00+00:00</updated>
    <author>
      <name>Benjamin Balder Bach</name>
    </author>
    <content type="html">&lt;section id="sphinx-6-is-out-and-has-important-breaking-changes"&gt;

&lt;div class="admonition note"&gt;
&lt;p class="admonition-title"&gt;Note&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important updates to this post ⬇️&lt;/strong&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://sphinx-rtd-theme.readthedocs.io/"&gt;sphinx-rtd-theme&lt;/a&gt; 1.2.0 has been released with support for Sphinx 6.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/readthedocs/readthedocs.org/pull/9654"&gt;A necessary platform update on Read the Docs&lt;/a&gt;,
released on February 7th 2023,
allows for jQuery to be included in certain complex scenarios pertaining Sphinx 6.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sphinx 6.1 has also been released with frequent patch releases.
Be aware of &lt;a class="reference external" href="https://github.com/sphinx-doc/sphinx/issues"&gt;open issues on the Sphinx GitHub project&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://pypi.org/project/sphinxcontrib.jquery/"&gt;sphinxcontrib-jquery&lt;/a&gt; 3.0.0 does not work on local builds while version 2.0.0 relies on Google’s CDN.
&lt;a class="reference external" href="https://github.com/sphinx-contrib/jquery/pull/14"&gt;A fix&lt;/a&gt; is waiting for review and release.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Sphinx 6 was released on December 29, 2022.
It contains a few major breaking changes that users should be aware of,
and some smaller new features as well.
Here are some of our considerations for the upgrade process:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Python 3.8+ is required. To enable this on Read the Docs, you will need to specify a Python version using the &lt;a class="reference external" href="https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python" title="(in Read the Docs user documentation v9.15.0)"&gt;&lt;span&gt;build.tools.python&lt;/span&gt;&lt;/a&gt; setting. If it’s possible for your project, you can make the jump all the way to Python 3.11.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support is dropped for docutils 0.14, 0.15, 0.16 and 0.17. It now supports only docutils 0.18 or 0.19.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="https://sphinx-rtd-theme.readthedocs.io/"&gt;sphinx-rtd-theme&lt;/a&gt; will support Sphinx 6 from 1.2.0, including docutils 0.18.
You can already install the release candidate: &lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;pip&lt;/span&gt; &lt;span class="pre"&gt;install&lt;/span&gt; &lt;span class="pre"&gt;sphinx-rtd-theme==1.2.0rc4&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bundled jQuery is removed.
The JavaScript asset is easily added back using the new extension &lt;a class="reference external" href="https://pypi.org/project/sphinxcontrib.jquery/"&gt;sphinxcontrib-jquery&lt;/a&gt;.
It is included automatically by &lt;a class="reference external" href="https://sphinx-rtd-theme.readthedocs.io/"&gt;sphinx-rtd-theme&lt;/a&gt;, so if you are using our theme,
you will also continue to have jQuery available in your documentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All bundled JavaScript was removed, including also underscore.js.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information and full details you can read the &lt;a class="reference external" href="https://www.sphinx-doc.org/en/master/changes.html#release-6-0-0-released-dec-29-2022"&gt;Sphinx changelog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since most documentation projects rely on themes and extensions,
we recommend checking for Sphinx 6 support in those projects before upgrading.&lt;/p&gt;
&lt;section id="less-maintenance-work-in-the-future"&gt;
&lt;h2&gt;Less maintenance work in the future&lt;/h2&gt;
&lt;p&gt;Sphinx 6 focuses on reducing the maintenance burden for the future.
This is done by simplifying the factor of supported docutils versions and Python versions.&lt;/p&gt;
&lt;p&gt;Moving forwards,
the number of upgrade paths for documentation projects
are fewer and thus will lead to less choices for documentation owners and
maintainers of Sphinx themes and extensions.
This is a positive step forward for both documentation projects, themes and extensions.
If your Sphinx extensions and theme support Sphinx 6, we recommend this upgrade in order to reduce complexities and future technical debt.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="possible-issues"&gt;
&lt;h2&gt;Possible issues&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Sphinx 6.0 and 6.1 are very fresh releases. As such, please remember:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Not all extensions and themes have added support for the new versions!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You may experience issues if you have not pinned your documentation dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Issues may also be caused by new bugs in the Sphinx 6 compatibility of extensions and themes.
Visiting the issue trackers of these projects is helpful.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We are actively updating our theme to support Sphinx and docutils updates.
If you find regressions in any new releases of the &lt;a class="reference external" href="https://sphinx-rtd-theme.readthedocs.io/"&gt;sphinx-rtd-theme&lt;/a&gt;,
please don’t hesitate to &lt;a class="reference external" href="https://github.com/readthedocs/sphinx_rtd_theme/"&gt;open an issue on GitHub&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you suspect that upgrade issues are caused by dependency mismatches,
we recommend taking the approach of &lt;em&gt;reproducible builds&lt;/em&gt;.
This includes explicitly specifying all relevant dependencies.
Read more in our documentation’s &lt;a class="reference external" href="https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html" title="(in Read the Docs user documentation v9.15.0)"&gt;&lt;span class="xref std std-doc"&gt;introduction to Reproducible Builds&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="don-t-fancy-upgrading"&gt;
&lt;h2&gt;Don’t fancy upgrading?&lt;/h2&gt;
&lt;p&gt;A new release of Sphinx doesn’t mean an obligation to upgrade immediately.
You can continue to use an older series of Sphinx such as 5.3.x, 4.5.x etc.&lt;/p&gt;
&lt;p&gt;Environments compatible with older versions of Sphinx are supported on Read the Docs for many years,
and Sphinx has a history of releasing updates for older series.&lt;/p&gt;
&lt;div class="system-message"&gt;
&lt;p class="system-message-title"&gt;System Message: INFO/1 (&lt;span class="docutils literal"&gt;/home/docs/checkouts/readthedocs.org/user_builds/test-githubblog/checkouts/latest/sphinx6-upgrade.rst&lt;/span&gt;, line 93); &lt;em&gt;&lt;a href="#id1"&gt;backlink&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Duplicate explicit target name: “sphinx-rtd-theme”.&lt;/p&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;/section&gt;
</content>
    <link href="https://blog.readthedocs.com/sphinx6-upgrade/" rel="alternate"/>
    <summary>Important updates to this post ⬇️sphinx-rtd-theme 1.2.0 has been released with support for Sphinx 6.</summary>
    <category term="sphinx" label="sphinx"/>
    <category term="python" label="python"/>
    <published>2023-01-04T00:00:00+00:00</published>
  </entry>
</feed>
