Skip to content

Commit

Permalink
Fixing building docs with Sphinx 3.0
Browse files Browse the repository at this point in the history
1. Remove the bbdocs.highlighterrors extension, which is incompatible with
   Sphinx 3.0, where sphinx.highlighting.PygmentsBridge.unhighlighted()
   is removed. Actually that extension appears to be unused all the time.
   When that module is added [1], Sphinx 1.3.3 is used [2], while calls
   to PygmentsBridge.unhighlighted() had been gradually removed in Sphinx
   1.2 [3] and 1.3 [4].
2. Fix duplicate names in docs. Two of them are caused by incorrect
   function/class name, and others are by same class names in different
   Python modules with missing py:module declarations.
3. Bump the Sphinx version

[1] b3292b1
[2] https://github.com/buildbot/buildbot/blob/b3292b136a9bce478aacc36b2462e922d5575e93/.travis.yml#L127
[3] sphinx-doc/sphinx@b29226a
[4] sphinx-doc/sphinx@db1cf80
  • Loading branch information
Chih-Hsuan Yen committed Apr 8, 2020
1 parent 5992214 commit 16fc5f4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 100 deletions.
1 change: 1 addition & 0 deletions master/buildbot/newsfragments/update-sphinx-3.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make docs build with Sphinx 3 and fix some typos and incorrect Python module declarations
96 changes: 0 additions & 96 deletions master/docs/bbdocs/highlighterrors.py

This file was deleted.

1 change: 0 additions & 1 deletion master/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
'sphinx.ext.todo',
'sphinx.ext.extlinks',
'bbdocs.ext',
'bbdocs.highlighterrors',
'sphinxcontrib.blockdiag',
'sphinxcontrib.jinja',
'sphinx_rtd_theme',
Expand Down
8 changes: 7 additions & 1 deletion master/docs/developer/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ The classes in the :py:mod:`buildbot.util.subscription` module are used for deal

Get a named state value from the object's state.

.. py:method:: getState(name, value)
.. py:method:: setState(name, value)
:param name: the name of the value to change
:param value: the value to set - must be a JSONable object
Expand Down Expand Up @@ -1143,6 +1143,8 @@ For example, a particular daily scheduler could be configured on multiple master
:py:mod:`buildbot.util.httpclientservice`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. py:module:: buildbot.util.httpclientservice
.. py:class:: HTTPClientService
This class implements a SharedService for doing http client access.
Expand Down Expand Up @@ -1257,6 +1259,8 @@ For example, a particular daily scheduler could be configured on multiple master
:py:mod:`buildbot.test.fake.httpclientservice`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. py:module:: buildbot.test.fake.httpclientservice
.. py:class:: HTTPClientService
This class implements a fake version of the :class:`buildbot.util.httpclientservice.HTTPClientService` that needs to be used for testing services which needs http client access.
Expand Down Expand Up @@ -1353,6 +1357,8 @@ For example, a particular daily scheduler could be configured on multiple master
:py:mod:`buildbot.util.ssl`
~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. py:module:: buildbot.util.ssl
This module is a copy of :py:mod:`twisted.internet.ssl` except it won't crash with :py:class:`ImportError` if :py:mod:`pyopenssl` is not installed.
If you need to use :py:mod:`twisted.internet.ssl`, please instead use :py:mod:`buildbot.util.ssl`, and call :py:func:`ssl.ensureHasSSL` in :py:meth:`checkConfig` to provide helpful message to the user, only if he enabled SSL for your plugin.

Expand Down
2 changes: 1 addition & 1 deletion master/docs/manual/configuration/buildsteps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2658,7 +2658,7 @@ It is usually called with the ``value`` argument being specified as a :ref:`Inte
:class:`SetProperties` step
+++++++++++++++++++++++++++

.. py:class:: buildbot.steps.master.SetProperty
.. py:class:: buildbot.steps.master.SetProperties
:bb:step:`SetProperties` takes a dictionary to be turned into build properties.

Expand Down
2 changes: 1 addition & 1 deletion requirements-cidocs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==2.4.4
Sphinx==3.0.0
sphinx-jinja==1.1.0
sphinx-rtd-theme==0.4.3
sphinxcontrib-blockdiag==2.0.0
Expand Down

0 comments on commit 16fc5f4

Please sign in to comment.