You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Szymkiewicz (Jira)" <ji...@apache.org> on 2021/11/19 14:07:00 UTC

[jira] [Created] (SPARK-37390) Buggy method retrival in pyspark.docs.conf.setup

Maciej Szymkiewicz created SPARK-37390:
------------------------------------------

             Summary: Buggy method retrival in pyspark.docs.conf.setup
                 Key: SPARK-37390
                 URL: https://issues.apache.org/jira/browse/SPARK-37390
             Project: Spark
          Issue Type: Bug
          Components: Documentation, PySpark
    Affects Versions: 3.2.0, 3.1.0, 3.3.0
            Reporter: Maciej Szymkiewicz


[Currently we have this code|https://github.com/apache/spark/blob/04af08e9b6d692ed4b5df5581e39de138067211c/python/docs/source/conf.py#L374-L376]

{code:python}
def setup(app):
    # The app.add_javascript() is deprecated.
    getattr(app, "add_js_file", getattr(app, "add_javascript"))('copybutton.js')
{code}

where nested {{getattr}} should handle compatibility issues between different Sphinx versions.

However, {{getattr(app, "add_javascript"))}} is missing {{default}} and will fail in latest Sphinx version, without ever falling back to {{getattr(app, "add_js_file")}}

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org