This is an automated email from the ASF dual-hosted git repository.

alenka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new d236ceac4b GH-40623: [Python][Docs] Add workaround for autosummary 
(#40739)
d236ceac4b is described below

commit d236ceac4b8cad199aad88d8d57db1b984087409
Author: Sutou Kouhei <[email protected]>
AuthorDate: Mon Mar 25 18:44:56 2024 +0900

    GH-40623: [Python][Docs] Add workaround for autosummary (#40739)
    
    ### Rationale for this change
    
    Sphinx < 7.3.0 has a problem that auto generated files may use wrong suffix.
    
    See https://github.com/sphinx-doc/sphinx/issues/12147 for details.
    
    ### What changes are included in this PR?
    
    Use `.rst` as the first `source_suffix` item as a workaround of this 
problem.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * GitHub Issue: #40623
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: AlenkaF <[email protected]>
---
 docs/source/conf.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/source/conf.py b/docs/source/conf.py
index 7915e2c2c4..ad8fa798d6 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -208,8 +208,14 @@ templates_path = ['_templates']
 #
 
 source_suffix = {
-    '.md': 'markdown',
+    # We need to keep "'.rst': 'restructuredtext'" as the first item.
+    # This is a workaround of
+    # https://github.com/sphinx-doc/sphinx/issues/12147 .
+    #
+    # We can sort these items in alphabetical order with Sphinx 7.3.0
+    # or later that will include the fix of this problem.
     '.rst': 'restructuredtext',
+    '.md': 'markdown',
 }
 
 autosummary_generate = True

Reply via email to