Skip to content

Commit

Permalink
Merge branch '3.4.x' into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Dec 24, 2020
2 parents a18fee2 + 7ae7eab commit b1a47f8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
17 changes: 13 additions & 4 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Bugs fixed
Testing
--------

Release 3.4.1 (in development)
Release 3.4.2 (in development)
==============================

Dependencies
Expand All @@ -37,16 +37,25 @@ Features added
Bugs fixed
----------

Testing
--------

Release 3.4.1 (released Dec 25, 2020)
=====================================

Bugs fixed
----------

* #8559: autodoc: AttributeError is raised when using forward-reference type
annotations
* #8568: autodoc: TypeError is raised on checking slots attribute
* #8567: autodoc: Instance attributes are incorrectly added to Parent class
* #8566: autodoc: The ``autodoc-process-docstring`` event is emitted to the
alias classes unexpectedly
* #8583: autodoc: Unnecessary object comparision via ``__eq__`` method
* #8565: linkcheck: Fix PriorityQueue crash when link tuples are not
comparable

Testing
--------

Release 3.4.0 (released Dec 20, 2020)
=====================================

Expand Down
17 changes: 10 additions & 7 deletions sphinx/ext/autodoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,12 @@ def get_sourcename(self) -> str:
def add_content(self, more_content: Optional[StringList], no_docstring: bool = False
) -> None:
"""Add content from docstrings, attribute documentation and user."""
if no_docstring:
warnings.warn("The 'no_docstring' argument to %s.add_content() is deprecated."
% self.__class__.__name__,
RemovedInSphinx50Warning, stacklevel=2)
# Suspended temporarily (see https://github.com/sphinx-doc/sphinx/pull/8533)
#
# if no_docstring:
# warnings.warn("The 'no_docstring' argument to %s.add_content() is deprecated."
# % self.__class__.__name__,
# RemovedInSphinx50Warning, stacklevel=2)

# set sourcename and add content from attribute documentation
sourcename = self.get_sourcename()
Expand Down Expand Up @@ -1660,8 +1662,9 @@ def add_content(self, more_content: Optional[StringList], no_docstring: bool = F
) -> None:
if self.doc_as_attr:
more_content = StringList([_('alias of %s') % restify(self.object)], source='')

super().add_content(more_content)
super().add_content(more_content, no_docstring=True)
else:
super().add_content(more_content)

def document_members(self, all_members: bool = False) -> None:
if self.doc_as_attr:
Expand Down Expand Up @@ -1827,7 +1830,7 @@ def import_object(self, raiseerror: bool = False) -> bool:
return False

def should_suppress_value_header(self) -> bool:
return (self.object == UNINITIALIZED_ATTR or
return (self.object is UNINITIALIZED_ATTR or
super().should_suppress_value_header())

def get_doc(self, encoding: str = None, ignore: int = None) -> List[List[str]]:
Expand Down

0 comments on commit b1a47f8

Please sign in to comment.