Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-16206

Eliminate gen-doc template warning and unused (problematic) import

    XMLWordPrintableJSON

Details

    Description

      1)

      When running 'sphinx-build -b html -d build/doctrees source build/html'
      on Linux we get the following warning:

           [exec] generating indices... genindex
           [exec] WARNING: Now base template defindex.html is deprecated.
           [exec] writing additional pages... index search

      On FreeBSD this causes gen-doc to fail:

           [exec] writing additional pages...  indexfailed
           [exec]
           [exec] Theme error:
           [exec] An error happened in rendering the page index.
           [exec] Reason: UndefinedError("'warn' is undefined")
           [exec] *** Error code 2

      2)

      The patch to doc/source/_util/cql.py removes the unused iteritems import, preventing errors on versions of pygments 2.6.0+:

           [exec] Running Sphinx v3.2.1
           [exec]
           [exec] Exception occurred:
           [exec]   File "/path/to/apache-cassandra-4.0-beta2-src/doc/source/_util/cql.py", line 29, in <module>
           [exec]     from pygments.util import iteritems
           [exec] ImportError: cannot import name 'iteritems' from 'pygments.util' (/usr/local/lib/python3.7/site-packages/pygments/util.py)

      The patch has been tested in the following environments:

      • FreeBSD 12.1-RELEASE-p7
        Python 3.7.9
        Sphinx 3.2.1
        pygments 2.7.1
      • Ubuntu 18.04.1
        Python 3.7.5
        Sphinx 1.6.7
        pygments 2.2.0
      • Ubuntu 18.04.1
        Python 2.7.17
        Sphinx 1.6.7
        pygments 2.5.2

      Attachments

        Issue Links

          Activity

            People

              polo-language Angelo Polo
              polo-language Angelo Polo
              Angelo Polo
              Ekaterina Dimitrova, Michael Semb Wever
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m