Takeshi KOMIYA
f996859420
A happy new year!
...
.. note::
$ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
$ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA
5383846ced
Merge pull request #8622 from tk0miya/8616_AttributeError_for_non_class
...
Fix #8616 : autodoc: AttributeError when non-class is passed to autoclass
2020-12-31 21:22:06 +09:00
Takeshi KOMIYA
1353a7b82f
Merge branch '3.4.x' into 8616_AttributeError_for_non_class
2020-12-31 21:12:29 +09:00
Takeshi KOMIYA
1dd0cc8494
Merge pull request #8611 from tk0miya/8602_process-docstring_for_nondatadescriptors
...
Fix #8602 : autodoc: The ``autodoc-process-docstring`` event is emitted to the non-datadescriptors unexpectedly
2020-12-31 10:43:20 +09:00
Takeshi KOMIYA
e3b1fdeeeb
Merge branch '3.4.x' into 8602_process-docstring_for_nondatadescriptors
2020-12-31 10:13:03 +09:00
Takeshi KOMIYA
0f8debe558
Fix #8616 : autodoc: AttributeError when non-class is passed to autoclass
...
Since 3.4.0, AttributeError is raised when non-class object is passed to
the autoclass directive. It has built successfully before 3.4.0
release. So this handles the exception on generating "alias" text.
2020-12-30 23:29:06 +09:00
Takeshi KOMIYA
3f560cd672
Merge pull request #8612 from tk0miya/reduce_Warning
...
refactor: Reduce warnings on testing
2020-12-29 19:39:41 +09:00
Takeshi KOMIYA
f054b9b976
refactor: Reduce warnings on testing
2020-12-29 19:23:46 +09:00
Takeshi KOMIYA
aaee3520f3
Merge pull request #8607 from tk0miya/8164_subclass_of_mocked_class
...
Fix #8164 : autodoc: Classes that inherit mocked class are not documented
2020-12-29 18:31:53 +09:00
Takeshi KOMIYA
97f36a2d02
Fix #8602 : autodoc: The `autodoc-process-docstring` event is emitted to the non-datadescriptors unexpectedly
2020-12-29 18:04:24 +09:00
Takeshi KOMIYA
85567748d9
Fix #8164 : autodoc: Classes that inherit mocked class are not documented
...
Use ismock() to check a module member is a mocked or not. It allows not
to skip subclasses of mocked class.
2020-12-29 00:26:23 +09:00
Takeshi KOMIYA
1a659c6ca7
testing: Add rollback_sysmodules fixture to unload modules after tests
2020-12-29 00:26:23 +09:00
Takeshi KOMIYA
476169284d
autodoc: Add a helper that checks the object is mocked; ismock()
2020-12-28 21:50:36 +09:00
Takeshi KOMIYA
7ae7eab65d
Bump version
2020-12-25 00:05:29 +09:00
Takeshi KOMIYA
f5406b9187
Bump to 3.4.1 final
v3.4.1
2020-12-25 00:04:05 +09:00
Takeshi KOMIYA
b94752a293
Merge pull request #8585 from tk0miya/8583_unnecessary_eq
...
Fix #8583 : autodoc: Unnecessary object comparision via ``__eq__`` method
2020-12-24 23:55:44 +09:00
Takeshi KOMIYA
5c39d0c068
Fix #8583 : autodoc: Unnecessary object comparision via `__eq__` method
...
It should be compared by `is` keyword instead.
2020-12-24 23:42:32 +09:00
Takeshi KOMIYA
043260481b
Merge pull request #8581 from tk0miya/8566_autodoc_process_docstring_for_alias_classes
...
Fix #8566 : autodoc-process-docstring is emitted to the alias classes
2020-12-24 23:35:01 +09:00
Takeshi KOMIYA
df8ab215c0
Fix #8566 : autodoc-process-docstring is emitted to the alias 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: https://github.com/sphinx-doc/sphinx/pull/8533
2020-12-24 01:34:23 +09:00
Takeshi KOMIYA
46eaa5db80
Merge pull request #8579 from francoisfreitag/fix-queue
...
Ensure linkcheck items are comparable
2020-12-23 22:43:11 +09:00
François Freitag
a1b8b1febb
Ensure linkcheck items are comparable
...
Linkcheck organizes the URLs to checks in a PriorityQueue. The items are
tuples (priority, url, docname, lineno).
Tuples where the lineno is `None` are not comparable with tuples that
have an integer lineno, and PriorityQueue items must be comparable (see
https://bugs.python.org/issue31145 ).
Fixes an issue when a document contains two links to the same URL, one
with an int line number and the other without line number metadata (such
as an image :target: attribute).
Using 0 instead of None to represent no line number should not lead to
observable changes, the result logger only logs the line number when it
is truthy.
Close #8565
2020-12-22 21:18:31 +01:00
Takeshi KOMIYA
955d6558ec
Merge pull request #8571 from tk0miya/8567_wrong_ivars_in_parent_class
...
Fix #8567 : autodoc: Instance attributes are incorrectly added to Parent class
2020-12-22 23:40:25 +09:00
Takeshi KOMIYA
70bb2262d6
Fix #8567 : autodoc: Instance attributes are incorrectly added to Parent class
...
The instance attributes on subclasses are shown on the document of
parent class unexpectedly because of autodoc modifies `__annotations__`
in place. This fix creates a copy of `__annotations__` attribute and
attach it to the subclass.
2020-12-22 02:38:31 +09:00
Takeshi KOMIYA
31cad2ebe7
Merge pull request #8570 from tk0miya/8569_getslots_TypeError
...
Fixes #8568 . Ignore TypeError from getslots in isslotsattribute
2020-12-22 01:24:24 +09:00
Takeshi KOMIYA
b3292b55b3
Update CHANGES for PR #8569
2020-12-22 01:14:04 +09:00
Takeshi KOMIYA
22080940e2
doc: Update docstring of getslots()
2020-12-22 00:53:27 +09:00
Rafal Wojdyla
4431f11876
Fixes #8568 . Ignore TypeError from getslots in isslotsattribute
2020-12-22 00:52:52 +09:00
Takeshi KOMIYA
97a0babd46
Merge pull request #8564 from tk0miya/8559_AttributeError_for_ForwardRef
...
Fix #8559 : AttributeError is raised when using ForwardRef
2020-12-22 00:50:22 +09:00
Takeshi KOMIYA
423e7ab2ca
Fix #8559 : AttributeError is raised when using ForwardRef
...
The restify() helper crashes when ForwardRef is passed.
2020-12-22 00:37:02 +09:00
Takeshi KOMIYA
323b136410
Bump version
2020-12-20 21:28:29 +09:00
Takeshi KOMIYA
79ff248154
Bump to 3.4.0 final
v3.4.0
2020-12-20 18:55:08 +09:00
Takeshi KOMIYA
61fd867b37
Merged CHANGES for 3.3.2 into 3.4.0 (unreleased)
2020-12-20 18:53:34 +09:00
Takeshi KOMIYA
723294f922
Merge pull request #8556 from tk0miya/8549_gettext_compact=0
...
Fix #8549 : i18n: ``-D gettext_compact=0`` is no longer working
2020-12-20 17:13:10 +09:00
Takeshi KOMIYA
1977f3fcee
Fix #8549 : i18n: `-D gettext_compact=0` is no longer working
...
Since 1bf7fe424 , ``-D gettext_compact=0`` is not treated as disabling
the feature. It is recognized as creating ``0.pot`` because its type is
Any. This changes it to `[bool, str]`.
2020-12-20 13:55:35 +09:00
Takeshi KOMIYA
6e8ea8572f
Merge pull request #8552 from tk0miya/8236_napoleon_receives_section
...
Close #8236 : napoleon: Support numpydoc's "Receives" section
2020-12-20 13:54:01 +09:00
Takeshi KOMIYA
7f1284f2e7
Merge pull request #8555 from tk0miya/8512_test_comment
...
test: Add comment for UnicodeEncodeError handler (refs: #8512 )
2020-12-20 13:53:24 +09:00
Takeshi KOMIYA
2fa15e9396
Merge pull request #8551 from tk0miya/8365_pydomain_xref_missing_context
...
Fix #8365 : py domain: :type: and :rtype: gives false ambiguous warnings
2020-12-20 13:49:53 +09:00
Takeshi KOMIYA
9a9d7f3f00
test: Add comment for UnicodeEncodeError handler (refs: #8512 )
2020-12-20 01:01:59 +09:00
Takeshi KOMIYA
aae2f19911
Merge pull request #8512 from jbms/fix-nonascii_srcdir
...
Fix nonascii_srcdir to work when non-ascii directories aren't supported
2020-12-20 00:58:08 +09:00
Takeshi KOMIYA
f50b999911
Close #8236 : napoleon: Support numpydoc's "Receives" section
2020-12-19 20:29:00 +09:00
Takeshi KOMIYA
30c594fbc5
Fix #8365 : py domain: :type: and :rtype: gives false ambiguous warnings
...
The searching context like py:module and py:class are missing in the
pending_xref nodes generated from info-field-lists. This sets these
searching context info to them.
2020-12-19 18:42:01 +09:00
Takeshi KOMIYA
57ed10c680
Merge pull request #8548 from tk0miya/741_inherited_ivar
...
Fix #741 : autodoc: inherited-members doesn't support instance attributes on super class
2020-12-19 00:31:03 +09:00
Takeshi KOMIYA
c0678a4a50
Fix #741 : autodoc: inherited-members doesn't support instance attributes on super class
...
To support instance attributes on super class, get_class_members() scans
the instance attributes defined at super classes using ModuleAnalyzer.
It allows to generate document for them when users gives :
inherited-members: option.
2020-12-18 23:24:59 +09:00
Takeshi KOMIYA
dd1615c59d
Merge pull request #8543 from tk0miya/8534_autoattribute_alias_derived
...
Fix #8534 : autoattribute failed to document a commented attribute in alias dervied class
2020-12-17 22:35:35 +09:00
Takeshi KOMIYA
e3dc782364
Merge pull request #8546 from tk0miya/8545_slots_attributes_having_docstring
...
Fix #8545 : autodoc: a __slots__ attribute is not documented even having docstring
2020-12-17 22:34:58 +09:00
Takeshi KOMIYA
9721327989
Fix #8545 : autodoc: a __slots__ attribute is not documented even having docstring
...
To avoid filtering __slots__ attributes having docstring at
filter_members(), this passes docstring captured at get_class_members()
to the filter_members() via ObjectMember.
2020-12-17 22:19:28 +09:00
Takeshi KOMIYA
964392d316
refactor: get_class_members() now returns docstring if available
...
To detect a __slots__ attribute has docstring, get_class_members()
returns the docstring of the class member.
2020-12-17 22:19:27 +09:00
Takeshi KOMIYA
18973f6c1b
refactor: autodoc: Add get_class_members()
...
To enhance ClassDocumenter, Add a new helper function get_class_members().
At this moment, it is a copy of get_object_members(). It will be
changed to return more detailed information of class members.
2020-12-17 22:19:12 +09:00
Takeshi KOMIYA
0dbbf1dd54
Fix #8534 : autoattribute failed to document a commented attribute in alias dervied class
2020-12-17 22:13:20 +09:00
Takeshi KOMIYA
beeab6ced4
Merge pull request #8542 from tk0miya/8541_autodoc_type_aliases_for_ivar
...
Fix #8541 : autodoc_type_aliases doesn't work for the instance attrs
2020-12-17 22:12:06 +09:00