Angelo Polo created CASSANDRA-16206:
---------------------------------------

             Summary: Eliminate gen-doc template warning and unused 
(problematic) import
                 Key: CASSANDRA-16206
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16206
             Project: Cassandra
          Issue Type: Bug
          Components: Build, Documentation/Website
            Reporter: Angelo Polo


1)

When running 'sphinx-build -b html -d build/doctrees source build/html'
on Linux we get the following warning:
{noformat}
     [exec] generating indices... genindex
     [exec] WARNING: Now base template defindex.html is deprecated.
     [exec] writing additional pages... index search{noformat}
On FreeBSD this causes gen-doc to fail:
{noformat}
     [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{noformat}
2)

The patch to doc/source/_util/cql.py removes the unused iteritems import, 
preventing errors on versions of pygments 2.6.0+:
{noformat}
     [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){noformat}
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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to