[PATCH] D75284: [Sphinx] Adjust for source_parsers deprecation in Sphinx 3.0

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 11:46:32 PST 2020


JDevlieghere created this revision.
JDevlieghere added reviewers: hans, arphaman, sylvestre.ledru.
Herald added subscribers: llvm-commits, dexonsmith.
Herald added a project: LLVM.
JDevlieghere updated this revision to Diff 247054.
JDevlieghere added a comment.

Don't bump the minimum sphinx version as the bot's are running 1.7. Before this land we should verify that the new config variable works with older Sphinx.


Update the Sphinx configuration for the removal of source_parsers in Sphinx 3.0. The variable has been deprecated since version 1.8.

> Version 1.8 deprecates and version 3.0 removes the source_parsers configuration variable that was used by older recommonmark versions.

https://www.sphinx-doc.org/en/master/usage/markdown.html


https://reviews.llvm.org/D75284

Files:
  llvm/docs/conf.py


Index: llvm/docs/conf.py
===================================================================
--- llvm/docs/conf.py
+++ llvm/docs/conf.py
@@ -26,15 +26,16 @@
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo']
+extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo', 'recommonmark']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
 # The suffix of source filenames.
-source_suffix = ['.rst', '.md']
-
-source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
+source_suffix = {
+    '.rst': 'restructuredtext',
+    '.md': 'markdown',
+}
 
 # The encoding of source files.
 #source_encoding = 'utf-8-sig'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75284.247054.patch
Type: text/x-patch
Size: 836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200227/54dcf2a0/attachment.bin>


More information about the llvm-commits mailing list