Commit Graph

16646 Commits

Author SHA1 Message Date
Takeshi KOMIYA
1cf915f7dd
Merge pull request #8804 from tk0miya/8791_linkcheck_docname_isnt_shown
linkcheck: The docname of hyperlink is not displayed (refs: #8791)
2021-02-02 23:09:03 +09:00
Takeshi KOMIYA
000ed29ff7
Merge pull request #8812 from jfbu/latex_url_as_footnotes_in_signatures
Latex url as footnotes in signatures
2021-02-02 22:58:37 +09:00
Takeshi KOMIYA
54f31891c2
Merge pull request #8811 from tk0miya/8782_xref_in_todolist
Fix #8782: todo: Cross references in todolist get broken
2021-02-02 22:54:14 +09:00
jfbu
c8eba61fe9 Update CHANGES 2021-02-02 00:13:48 +01:00
jfbu
7c7032dd05 Extend latex footnotes unit test 2021-02-02 00:10:45 +01:00
jfbu
c3b44dc1c8 LaTeX: save footnotes arising from inside function signatures
if latex_show_urls == 'footnote'
2021-02-01 23:49:40 +01:00
jfbu
fbe24647e4 LaTeX: sync with upstream footnotehyper 1.1c
Incorporate 1.1c fix to usage of savenotes around a mid-paragraph list,
and also the 1.0..1.1 upstream patch about usage within minipages while
we are at it.
2021-02-01 23:25:50 +01:00
Takeshi KOMIYA
a65b333c87 Fix #8782: todo: Cross references in todolist get broken
On resolving cross reference nodes in todolist, some of them get broken
because todo extension does not rewrite the "refdoc" attribute of them.
2021-02-02 01:27:11 +09:00
Takeshi KOMIYA
f803266d63
Merge pull request #8805 from tk0miya/8775_workaround
Fix #8775: Avoid the crash of autodoc caused by type union operator
2021-02-01 21:35:04 +09:00
Takeshi KOMIYA
223f59b3c5
Merge pull request #8802 from tk0miya/8775_pydomain_pep604
py domain: Support type union operator (PEP-604) (refs: #8775)
2021-02-01 21:22:38 +09:00
Takeshi KOMIYA
7ca5248057 Fix #8775: Avoid the crash of autodoc caused by type union operator
The type union operator (PEP-604) causes autodoc crashed in python 3.9
or below because of the syntax is not suppoerted yet in the interpreters.
Internally, `typing.get_type_hints()` raises TypeError on evaluating the
annotation by BitOr operator for types.

To avoid the crash, this adds a fallback not to evaluate the annotations
and keep as is.  As a side effect, `autodoc_type_aliases` will not work
for the modules and classes that uses type union operator for their
annotations.
2021-02-01 21:21:56 +09:00
Takeshi KOMIYA
2956f19674
Merge pull request #8803 from tk0miya/8775_autodoc_type_union_operator
autodoc: Support type union operator (PEP-604) (refs: #8775)
2021-02-01 21:19:45 +09:00
Takeshi KOMIYA
ce7be36a12
Merge pull request #8801 from tk0miya/8800_docstring_for_uninitialized_attribute_on_superclass_ignored
Fix #8800: autodoc: Uninitialized attributes in superclass are recognized as undocumented
2021-02-01 21:15:07 +09:00
Takeshi KOMIYA
2c2b8c1154 py domain: Support type union operator (PEP-604) (refs: #8775)
Upgrade annotation parser for python domain to support type union
operator introduced in PEP-604.  It's available on all python
interpreters.
2021-02-01 21:12:29 +09:00
Takeshi KOMIYA
6d8c9183fa Fix #8800: autodoc: Uninitialized attributes in superclass are recognized as undocumented
Unintentionally, uninitialized attributes defined at superclasses are
recognized as undocumented in the filtering step.  Therefore, they are
filtered if `:undoc-members:` option given.
2021-02-01 21:06:07 +09:00
Takeshi KOMIYA
7ca279e33a
Merge pull request #8799 from tk0miya/refactor_util_get
refactor: AttributeError handling for sphinx.util.inspect.get* is not needed
2021-02-01 21:04:02 +09:00
Takeshi KOMIYA
d3101dd6f7
Merge pull request #8472 from tk0miya/8446_escape_spaces_inside_desc_signatures
Fix #8446: html: consecutive spaces are displayed as single space
2021-02-01 01:44:48 +09:00
Takeshi KOMIYA
af6ed52ca1
Merge branch '3.x' into 8446_escape_spaces_inside_desc_signatures 2021-02-01 01:24:02 +09:00
Takeshi KOMIYA
88c6330900 linkcheck: The docname of hyperlink is not displayed (refs: #8791)
Currently, linkcheck displays the status of hyperlinks.  But it is hard
to search where the hyperlink is written because only line numbers are
shown as the location for the link.

This displays the docname of the link too.
2021-02-01 01:15:53 +09:00
Takeshi KOMIYA
434cc60ae5
Merge pull request #8794 from tk0miya/refactor_linkcheck3
refactor: linkcheck: Update type annotations
2021-01-31 23:45:59 +09:00
Takeshi KOMIYA
621379e194
Merge pull request #8793 from tk0miya/refactor_linkcheck
refactor: linkcheck: Access config object via self.config
2021-01-31 23:45:41 +09:00
Takeshi KOMIYA
7f6a6926b9 Merge branch '3.4.x' into 3.x 2021-01-31 23:43:52 +09:00
Takeshi KOMIYA
7318d1dfd4 autodoc: Support type union operator (PEP-604) (refs: #8775)
Upgrade autodoc to support type union operator introduced in
PEP-604. It's available only with python 3.10+.
2021-01-31 23:38:36 +09:00
Takeshi KOMIYA
42e491a4c2 refactor: AttributeError handling for getslots() is not needed 2021-01-31 18:43:41 +09:00
Takeshi KOMIYA
9c56224231 refactor: AttributeError handling for getall() is not needed 2021-01-31 18:42:44 +09:00
Takeshi KOMIYA
50295f18c2 refactor: AttributeError handling for getannotations() is not needed 2021-01-31 18:42:32 +09:00
Takeshi KOMIYA
e6f445f2f8 refactor: AttributeError handling for getmro() is not needed
Internally, sphinx.util.inspect.getmro() uses `safe_getattr()` with
the `default` keyword.  Therefore it never raises AttributeError even if
the subject raises an error on accessing `__mro__` attribute.

This fixes the wrong its usage.
2021-01-31 18:41:19 +09:00
Takeshi KOMIYA
76bbaf7389
Merge pull request #8797 from jfbu/latex_sphinxsafeincludegraphics_corebug
Latex sphinxsafeincludegraphics corebug
2021-01-31 18:10:50 +09:00
jfbu
567cc4fb7b Update CHANGES 2021-01-31 09:58:06 +01:00
jfbu
dd8e79e7fc Fix #8796: define \spx@image@box as a box not a dimen!
This bug was introduced at 2.0 (commit 669f9c3a) (sorry)
2021-01-31 09:53:09 +01:00
Takeshi KOMIYA
6701628e2e refactor: linkcheck: Update type annotations 2021-01-31 16:40:51 +09:00
Takeshi KOMIYA
d39fb5ce3a refactor: linkcheck: Access config object via self.config
Now builder objects have `config` attribute as a reference to the
living config object.  No reason to access it via `self.app.config`
longer!
2021-01-31 16:22:04 +09:00
Takeshi KOMIYA
804e46e27b
Merge pull request #8785 from tk0miya/8783_update_doc
doc: Update doc for project_copyright (refs: #8783)
2021-01-31 14:27:42 +09:00
jfbu
c07adc4ebb Fix docs markup from d6e11b89
Sorry that I fixed this in master already, forgetting it was initially
merged into 3.x.
2021-01-30 21:17:07 +01:00
Jean-François B
5969163c4f
Merge pull request #8787 from jfbu/latex_repair_celllinetrimming_after_8781
Let latex writer line trimming from depart_entry() work as before #8781
2021-01-30 19:39:36 +01:00
Jean-François B
34ac0ffae8
Merge pull request #8789 from jfbu/latex_fix_prehistoric_bug
LaTeX: remove last argument of \titleformat in sphinx.sty
2021-01-30 16:29:01 +01:00
jfbu
da00a1c22a LaTeX: remove last argument of \titleformat in sphinx.sty
The {\py@NormalColor} was wrong it should have been [\py@NormalColor].

It got executed by latex during document preamble and never got
integrated as part of the heading...

Closes: #8788
2021-01-30 16:09:58 +01:00
jfbu
5b6a273825 Let latex writer line trimming from depart_entry() work as before #8781
This is cosmetic as the blank line starting varwidth environment used
for merged table cells in latex output changed nothing to PDF.

Nevertheless I extended a unit test to have a multi-paragraph merged
cell using varwidth. What is important is that \sphinxAtStartPar line
itself is never followed by blank line.
2021-01-30 10:26:42 +01:00
Takeshi KOMIYA
ffe8fbf271 doc: Update doc for project_copyright (refs: #8783) 2021-01-30 11:38:16 +09:00
Jean-François B
be20f17892
Merge pull request #8779 from jfbu/latex_hlist_support
Fix #8072: Directive hlist not implemented in LaTeX
2021-01-29 21:05:19 +01:00
Jean-François B
879bf54a05
Merge pull request #8781 from jfbu/latex_hyphenation_of_first_word
Fix #8780: long words in narrow columns may not be hyphenated
2021-01-29 20:57:54 +01:00
jfbu
9abe2edf93 Remove unneeded versionchanged data in docs of hlist directive 2021-01-29 20:21:07 +01:00
jfbu
17642a5e6b Add \nobreak inside \sphinxAtStartPar
Else, a non-hyphenatable long word as first word in a narrow column in a
longtable/tabular (with column type e.g. p{1cm} from tabularcolumns
directive) gets shifted downwards vertically in PDF output.

Memo:

1. I did not find other cases where such a vertical shift may occur (I
tried with deeply nested lists and artificial words such as 'A'*32) with
LaTeX mark-up produced by Sphinx,

2. but with the support of hlist directive via PR #8779 using multicols
environment, there is again this situation of downwards shift of
non-hyphenatable long first words.  But it occurs whether or not
\sphinxAtStartPar is used (\nobreak does not modify this).
2021-01-29 13:10:21 +01:00
jfbu
d6e11b89e9 Fix suppression of needed whiteline, encapsulate into \sphinxAtStartPar
Define it to do nothing with lualatex engine
2021-01-29 10:40:50 +01:00
jfbu
185a2d27fe Fix #8780: long words in narrow columns may not be hyphenated
This is done by adding '\hskip0pt\relax\n' whenever a paragraph starts.
2021-01-29 00:24:44 +01:00
jfbu
a68a05533d Fix #8072: Directive hlist not implemented in LaTeX
Adds ``multicol`` LaTeX package requirement, but it is a required
part of any latex distribution.
2021-01-28 21:21:01 +01:00
Takeshi KOMIYA
57126d9ee2
Merge pull request #8773 from francoisfreitag/app-build
Linkcheck: Use app.build() to trigger the test build
2021-01-28 23:28:31 +09:00
Takeshi KOMIYA
14f2c9ebfa
Merge pull request #8770 from francoisfreitag/else
linkcheck: Raise on unknown status in process_result()
2021-01-28 23:27:27 +09:00
François Freitag
c7eb7cd127
Linkcheck: Use app.build() to trigger the test build
Instead of using application members to access the builder and trigger a
build, use the main app interface.
It ensures the builder setup is realistic, builder cleanups are executed
and the build-finished events are emitted.
2021-01-27 18:55:36 +01:00
François Freitag
227955cbe8
linkcheck: Raise on unknown status in process_result()
Helps catching programming errors. The else clause should never be
reached.
2021-01-27 17:36:10 +01:00