Skip to content

Sphinx doesn't render autodoc_docstring_signature correctly w/ Python 2 #5142

@mengxr

Description

@mengxr

Subject: Some pyspark.ml docs were generated without rendering the docstring signature when Python 2 is used.

Problem

See https://issues.apache.org/jira/browse/SPARK-24530. We use autodoc_docstring_signature in PySpark to render some ML class docs correctly. A correct version looks like the following:

screen shot 2018-06-12 at 8 23 29 am

And when it doesn't render correctly, it shows

screen shot 2018-06-12 at 8 23 18 am

We tried different Python/Sphinx versions and it seems it only appears with Python 2.

Procedure to reproduce the problem

# use python 2
git checkout [email protected]:apache/spark.git
cd spark/python/docs
make html
open _build/html/pyspark.ml.html

Check the generated doc of LogisticRegression

Error logs / results

Didn't notice any suspicious warning messages (-v -w warn.txt).

Reproducible project / your project

apache/spark

Environment info

  • OS: macOS
  • Python version: 2
  • Sphinx version: v1.6.3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions