Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx-apidoc output missing blank lines between modules #6440

Closed
bmerry opened this issue Jun 3, 2019 · 2 comments

Comments

@bmerry
Copy link

commented Jun 3, 2019

sphinx-apidoc produces invalid RST: it fails to output a blank line after each automodule block and before the next section header. This causes warnings when building the docs.

This seems to be a regression since 1.8.1. I haven't bisected it.

To Reproduce
Steps to reproduce the behavior: in an empty directory,

$ mkdir dummy doc
$ touch dummy/__init__.py dummy/mod1.py dummy/mod2.py
$ sphinx-apidoc -f -o doc dummy

Now doc/dummy.rst contains the following:

dummy package
=============

Submodules
----------

dummy.mod1 module
-----------------

.. automodule:: dummy.mod1
   :members:
   :undoc-members:
   :show-inheritance:
dummy.mod2 module
-----------------

.. automodule:: dummy.mod2
   :members:
   :undoc-members:
   :show-inheritance:


Module contents
---------------

.. automodule:: dummy
   :members:
   :undoc-members:
   :show-inheritance:

Expected behavior
There should be a blank line immediately above the header for dummy.mod2.

Environment info

  • OS: Ubuntu 18.04
  • Python version: 3.6.6
  • Sphinx version: 2.1.0
  • Sphinx extensions: sphinx.ext.autodoc

@bmerry bmerry added the bug label Jun 3, 2019

@dangunter

This comment has been minimized.

Copy link

commented Jun 3, 2019

I have also seen this issue. Since we check that the docs build without warnings, it is breaking our builds and we had to pin Sphinx to an older version.

@tk0miya tk0miya added this to the 2.1.1 milestone Jun 3, 2019

@tk0miya tk0miya added the autosummary label Jun 3, 2019

@stephenfin

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

I've tested this and it's not an issue with 2.0.0 but is introduced with 2.1.0.

stephenfin added a commit to stephenfin/sphinx that referenced this issue Jun 4, 2019
apidoc: Insert newlines between submodules
Fix a regression introduced in 2.1.0 where submodules didn't have a
newline between them resulting in the following warning:

  Explicit markup ends without a blank line; unexpected unindent.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: sphinx-doc#6440
openstack-gerrit pushed a commit to openstack/requirements that referenced this issue Jun 5, 2019
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I20d78e4a53a08b99e5ecd3bffe82778d251730f0
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 5, 2019
Update git submodules
* Update requirements from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I20d78e4a53a08b99e5ecd3bffe82778d251730f0
openstack-gerrit pushed a commit to openstack/python-mistralclient that referenced this issue Jun 6, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details
Depend-On: https://review.opendev.org/#/c/663060/

Change-Id: I01631bed507ac07dc192076685c427ceebd29eaf
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 6, 2019
Update git submodules
* Update python-mistralclient from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    Depend-On: https://review.opendev.org/#/c/663060/
    
    Change-Id: I01631bed507ac07dc192076685c427ceebd29eaf
openstack-gerrit pushed a commit to openstack/mistral-dashboard that referenced this issue Jun 6, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details
Depend-On: https://review.opendev.org/#/c/663060/

Change-Id: I71bc27c9e388a5892daaaa41db5d8e70dd39ea0e
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 6, 2019
Update git submodules
* Update mistral-dashboard from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    Depend-On: https://review.opendev.org/#/c/663060/
    
    Change-Id: I71bc27c9e388a5892daaaa41db5d8e70dd39ea0e
openstack-gerrit pushed a commit to openstack/mistral that referenced this issue Jun 6, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details
Depend-On: https://review.opendev.org/#/c/663060/

Change-Id: Ia9ab0cfb134f0f6ca168e8e746582fe1fc7c9710
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 6, 2019
Update git submodules
* Update mistral from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    Depend-On: https://review.opendev.org/#/c/663060/
    
    Change-Id: Ia9ab0cfb134f0f6ca168e8e746582fe1fc7c9710
rberg2 added a commit to rberg2/sawtooth-sdk-python that referenced this issue Jun 6, 2019
Pin Sphinx to 2.0.1 to workaround bug in 2.1.0
Upstream bug report here
sphinx-doc/sphinx#6440

Signed-off-by: Richard Berg <rberg@bitwise.io>
stephenfin added a commit to stephenfin/sphinx that referenced this issue Jun 6, 2019
apidoc: Insert newlines between submodules
Fix a regression introduced in 2.1.0 where submodules didn't have a
newline between them resulting in the following warning:

  Explicit markup ends without a blank line; unexpected unindent.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: sphinx-doc#6440
rberg2 added a commit to rberg2/sawtooth-core that referenced this issue Jun 6, 2019
Pin Sphinx to 2.0.1 to workaround bug in 2.1.0 1-1
Upstream bug report here
sphinx-doc/sphinx#6440

Signed-off-by: Richard Berg <rberg@bitwise.io>

@tk0miya tk0miya closed this in 65122ad Jun 8, 2019

openstack-gerrit pushed a commit to openstack/horizon that referenced this issue Jun 12, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details
Depend-On: https://review.opendev.org/#/c/663060/

Change-Id: Id66886127681d3987c0c9d6d233c35735700fdcb
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 12, 2019
Update git submodules
* Update horizon from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    Depend-On: https://review.opendev.org/#/c/663060/
    
    Change-Id: Id66886127681d3987c0c9d6d233c35735700fdcb
openstack-gerrit pushed a commit to openstack/ironic-ui that referenced this issue Jun 13, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details
Depend-On: https://review.opendev.org/#/c/663060/

Change-Id: Ib834a3a4b37c51f41e3659dcc9fe99f2fb5492ad
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 13, 2019
Update git submodules
* Update ironic-ui from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    Depend-On: https://review.opendev.org/#/c/663060/
    
    Change-Id: Ib834a3a4b37c51f41e3659dcc9fe99f2fb5492ad
openstack-gerrit pushed a commit to openstack/cloudkitty-dashboard that referenced this issue Jun 17, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details
Depend-On: https://review.opendev.org/#/c/663060/

Change-Id: I77e8409d2bb191e3ba6289533345b8d5fa46d2e6
openstack-gerrit added a commit to openstack/openstack that referenced this issue Jun 17, 2019
Update git submodules
* Update cloudkitty-dashboard from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    Depend-On: https://review.opendev.org/#/c/663060/
    
    Change-Id: I77e8409d2bb191e3ba6289533345b8d5fa46d2e6
openstack-gerrit pushed a commit to openstack/python-ironic-inspector-client that referenced this issue Aug 7, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Ibf9315a6e786c56d2c0cda5d7e9444692986169d
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 7, 2019
Update git submodules
* Update python-ironic-inspector-client from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Ibf9315a6e786c56d2c0cda5d7e9444692986169d
openstack-gerrit pushed a commit to openstack/python-cinderclient that referenced this issue Aug 8, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I1d923d9922bdaaca381611cba299522c21546736
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 8, 2019
Update git submodules
* Update python-cinderclient from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I1d923d9922bdaaca381611cba299522c21546736
openstack-gerrit pushed a commit to openstack/oslo.config that referenced this issue Aug 8, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I4c4a2083d6578c625b948b1458412b832264f11e
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 8, 2019
Update git submodules
* Update oslo.config from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I4c4a2083d6578c625b948b1458412b832264f11e
openstack-gerrit pushed a commit to openstack/tripleo-puppet-elements that referenced this issue Aug 9, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: If431fce391f669c483c7fd1efa97bb3b640ed2a1
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 9, 2019
Update git submodules
* Update tripleo-puppet-elements from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: If431fce391f669c483c7fd1efa97bb3b640ed2a1
openstack-gerrit pushed a commit to openstack/tacker that referenced this issue Aug 12, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Ia86d038cf244a9a0612cebe450801e0fc81d020f
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 12, 2019
Update git submodules
* Update tacker from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Ia86d038cf244a9a0612cebe450801e0fc81d020f
openstack-gerrit pushed a commit to openstack/dragonflow that referenced this issue Aug 13, 2019
pengyuesheng Shachar Snapiri
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Id3968215aceb1190e0cc5caa0db08891a1428ef7
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 16, 2019
Update git submodules
* Update tosca-parser from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I9adf3cb45d522635792b77bbbff43328f4f10461
openstack-gerrit pushed a commit to openstack/tosca-parser that referenced this issue Aug 16, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I9adf3cb45d522635792b77bbbff43328f4f10461
openstack-gerrit pushed a commit to openstack/heat-translator that referenced this issue Aug 16, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I7d8ef1469e329a945f38fa15498d440e82f0c209
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 16, 2019
Update git submodules
* Update heat-translator from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I7d8ef1469e329a945f38fa15498d440e82f0c209
openstack-gerrit pushed a commit to openstack/keystonemiddleware that referenced this issue Aug 16, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Ia166252623563438c42538320f6fbf7c74785520
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 16, 2019
Update git submodules
* Update keystonemiddleware from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Ia166252623563438c42538320f6fbf7c74785520
openstack-gerrit pushed a commit to openstack/blazar that referenced this issue Aug 22, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I6cf3c51168ea0571501a01ca44ea2134ec281f68
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 22, 2019
Update git submodules
* Update blazar from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I6cf3c51168ea0571501a01ca44ea2134ec281f68
openstack-gerrit pushed a commit to openstack/networking-bagpipe that referenced this issue Aug 26, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I528eded1f72d7d36aa6b99615fdb8bc1d5de3458
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 26, 2019
Update git submodules
* Update networking-bagpipe from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: I528eded1f72d7d36aa6b99615fdb8bc1d5de3458
openstack-gerrit pushed a commit to openstack/congress-tempest-plugin that referenced this issue Aug 27, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Ieca7534493a8fb02e334f2aac30c802f7061c714
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 27, 2019
Update git submodules
* Update congress-tempest-plugin from branch 'master'
  - Merge "Blacklist sphinx 2.1.0 (autodoc bug)"
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Ieca7534493a8fb02e334f2aac30c802f7061c714
openstack-gerrit pushed a commit to openstack/os-brick that referenced this issue Aug 28, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Ie1952c7b65542ac493e506c8916da0e1a856e838
openstack-gerrit added a commit to openstack/openstack that referenced this issue Aug 28, 2019
Update git submodules
* Update os-brick from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Ie1952c7b65542ac493e506c8916da0e1a856e838
openstack-gerrit pushed a commit to openstack/networking-baremetal that referenced this issue Sep 4, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Iab2338c193304de66a77861500dae020f94a1b8f
openstack-gerrit added a commit to openstack/openstack that referenced this issue Sep 4, 2019
Update git submodules
* Update networking-baremetal from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Iab2338c193304de66a77861500dae020f94a1b8f
openstack-gerrit pushed a commit to openstack/virtualbmc that referenced this issue Sep 5, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: Ia9e17c2295d3bf3f96436515a1c5a260ecf84e1d
openstack-gerrit added a commit to openstack/openstack that referenced this issue Sep 5, 2019
Update git submodules
* Update virtualbmc from branch 'master'
  - Blacklist sphinx 2.1.0 (autodoc bug)
    
    See sphinx-doc/sphinx#6440 for upstream details
    
    Change-Id: Ia9e17c2295d3bf3f96436515a1c5a260ecf84e1d
openstack-gerrit pushed a commit to openstack/networking-l2gw that referenced this issue Sep 18, 2019
pengyuesheng
Blacklist sphinx 2.1.0 (autodoc bug)
See sphinx-doc/sphinx#6440 for upstream details

Change-Id: I47a5ad7c95e7d255c460fd80d2c62c967c6b985c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.