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

refactor: Deprecate no_docstring argument for Documenter.add_content() #8533

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Dec 12, 2020

Feature or Bugfix

  • Refactoring

Purpose

  • This deprecates no_docstring argument for Documenter.add_content().
    After this change, please use Documenter.get_doc() to control (suppress)
    the content of the python object.

This deprecates `no_docstring` argument for Documenter.add_content().
After this change, please use Documenter.get_doc() to control (suppress)
the content of the python object.
@tk0miya tk0miya added this to the 3.4.0 milestone Dec 12, 2020
@tk0miya tk0miya merged commit 399210c into sphinx-doc:3.x Dec 13, 2020
@tk0miya tk0miya deleted the deprecate_no_docstring branch December 13, 2020 16:33
tk0miya added a commit to tk0miya/sphinx that referenced this pull request Dec 23, 2020
…s classes

On the refactoring of Documenter.add_content() method, the
autodoc-process-docstring event is emitted to the alias classes (called
as doc_as_attr in our code) unexpectedly.  Before the change, it has
never been emitted.

The event causes that extensions (ex. numpydoc) confused.  So this
reverts the change temporarily (during 3.4.x).

refs: sphinx-doc#8533
tk0miya added a commit to tk0miya/sphinx that referenced this pull request Dec 26, 2020
Deprecate `no_docstring` argument for `Documenter.add_content()` again.

At the first trial (sphinx-doc#8533), it changes the behavior of
`autodoc-process-docstring` event; it is emitted unexpectedly for an
alias of class.  But it brings an incompatible change to extensions.
Hence it was partially reverted at sphinx-doc#8581.

This keeps not calling the event for an alias of class.  To do that,
now `Documenter.get_doc()` can return None value.
tk0miya added a commit to tk0miya/sphinx that referenced this pull request Dec 26, 2020
Deprecate `no_docstring` argument for `Documenter.add_content()` again.

At the first trial (sphinx-doc#8533), it changes the behavior of
`autodoc-process-docstring` event; it is emitted unexpectedly for an
alias of class.  But it brings an incompatible change to extensions.
Hence it was partially reverted at sphinx-doc#8581.

This keeps not calling the event for an alias of class.  To do that,
now `Documenter.get_doc()` can return None value.
tk0miya added a commit to tk0miya/sphinx that referenced this pull request Dec 26, 2020
Deprecate `no_docstring` argument for `Documenter.add_content()` again.

At the first trial (sphinx-doc#8533), it changes the behavior of
`autodoc-process-docstring` event; it is emitted unexpectedly for an
alias of class.  But it brings an incompatible change to extensions.
Hence it was partially reverted at sphinx-doc#8581.

This keeps not calling the event for an alias of class.  To do that,
now `Documenter.get_doc()` can return None value.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants