Commit Graph

974 Commits

Author SHA1 Message Date
Septatrix
f655835338 Fix tests 2020-03-14 19:46:37 +01:00
Septatrix
81fe5f8477 Remove html_pygments_dark_style option 2020-03-14 18:46:02 +01:00
Takeshi KOMIYA
372813a137
Merge pull request #7262 from tk0miya/testcase_for_py
test: Add testcase for special case of PythonDomain.find_obj()
2020-03-07 23:18:07 +09:00
Takeshi KOMIYA
8f7cc26b20 autodoc: Support singledispatch methods 2020-03-07 17:50:10 +09:00
Takeshi KOMIYA
961b4d1545 Close #2815: autodoc: Support singledispatch functions 2020-03-07 17:50:10 +09:00
Takeshi KOMIYA
d7cab2ebfa test: Add testcase for special case of PythonDomain.find_obj() 2020-03-07 02:18:10 +09:00
Takeshi KOMIYA
cdbefb600f Support user defined LaTeX themes 2020-03-06 22:11:25 +09:00
Takeshi KOMIYA
34057601f4 Close #7165: autodoc: Support Annotated type (PEP-593) 2020-03-03 00:14:24 +09:00
Terence D. Honles
90de551d4c Fix: autodoc: __wrapped__ functions are not documented correctly
Functions that are decorated with `@lru_cache` or other `functools`
decorators may not even be detected as a function. This results in the
documentation not having the `()` or even trying to render the function
signature.

This change updates the `sphinx.util.inspect` code to unwrap
`__wrapped__` functions before determining if they can be documented.

`@lru_cache` and its associated test is an example of a decorated
function that is incorrectly identified as an attribute rather than a
module level function and when rendering the signature (upon changing
`isattributedescriptor`) the decorated function is still incorrectly
identified as a C function.

This change also renames the newly introduced `unwrap` as `unwrap_all`
because it is different than the prexisting Python supplied
`inspect.unwrap`.

See `update_wrapper` "Changed in version 3.4" for more background:
https://docs.python.org/3/library/functools.html#functools.update_wrapper
2020-02-27 16:27:41 -08:00
Takeshi KOMIYA
754d04f80d Merge branch '2.4.x' into 3.x 2020-02-22 19:22:31 +09:00
Takeshi KOMIYA
b162273962
Merge pull request #7064 from tk0miya/7025_nosearch
Close #7025: html search: full text search can be disabled via metadata
2020-02-22 17:53:01 +09:00
Takeshi KOMIYA
30b0361f9c Close #7025: html search: full text search can be disabled via metadata 2020-02-22 17:34:44 +09:00
Takeshi KOMIYA
2fec37219f Fix #7189: autodoc: classmethod coroutines are not detected 2020-02-22 00:49:45 +09:00
Takeshi KOMIYA
a033d53c24 Close #7032: html_scaled_image_link is disabled for individual image 2020-02-18 01:48:11 +09:00
Takeshi KOMIYA
954db2bd27 Merge branch '2.0' 2020-02-16 21:42:20 +09:00
Takeshi KOMIYA
b80c7cd234
Merge pull request #7152 from gpotter2/elipsispatch
Fix #7146: support (...) in type hint comments (V2)
2020-02-16 20:35:40 +09:00
Takeshi KOMIYA
cd8f3a78d9 Fix #7156: autodoc: separator for keyword only arguments is not shown 2020-02-16 01:37:23 +09:00
gpotter2
51b80ab121 Fix #7146 2020-02-14 16:12:12 +00:00
Takeshi KOMIYA
c5f0025ed9 Merge branch 'master' into 5637 2020-02-12 01:42:05 +09:00
Takeshi KOMIYA
2737691212 pretty style fix 2020-02-12 01:39:13 +09:00
Takeshi KOMIYA
6e0119526a Merge branch '2.0' 2020-02-09 16:21:32 +09:00
Takeshi KOMIYA
a17ad5cd39 Merge branch '2.3.2' into 2.0 2020-02-09 15:29:10 +09:00
Takeshi KOMIYA
2e87ee85a2 Merge branch '2.0' 2020-02-09 00:57:53 +09:00
Takeshi KOMIYA
13ca2323a9 Fix #7095: dirhtml: Cross references are broken via intersphinx and :doc: 2020-02-07 23:32:27 +09:00
Takeshi KOMIYA
ecf7307023
Merge branch '2.0' into 6785_attr_can_refer_props 2020-02-06 22:30:50 +09:00
Takeshi KOMIYA
92cb828f14 autodoc: Support type_comment styled type annotation for variables 2020-02-03 01:19:05 +09:00
Takeshi KOMIYA
0258394d0b
Merge branch '2.0' into 6785_attr_can_refer_props 2020-01-30 23:32:05 +09:00
Takeshi KOMIYA
e7a0af807a Merge branch '2.0' 2020-01-30 23:29:32 +09:00
Takeshi KOMIYA
67fefcc6f9
Merge branch '2.0' into 6418_autodoc_typehints_description 2020-01-30 23:19:45 +09:00
Jakob Lykke Andersen
3231b84827 C++, suppress some warnings that can never be fixed 2020-01-26 14:19:14 +01:00
Takeshi KOMIYA
dcd8f41a77 Add testcase for instance variables without defaults 2020-01-26 01:25:35 +09:00
Jakob Lykke Andersen
82a465c3b6
Merge pull request #7053 from jakobandersen/productionlist
Production list scoping and line continuation
2020-01-25 17:18:04 +01:00
Jakob Lykke Andersen
9fa23615ec Fixes from review 2020-01-25 17:02:59 +01:00
Jakob Lykke Andersen
84bd44d04a C++, fix cross references in compound directives
Fixes sphinx-doc/sphinx#5078
2020-01-25 11:43:26 +01:00
Jakob Lykke Andersen
80e08fe8fa C++, make lookup key point to correct overloads 2020-01-25 11:42:49 +01:00
Takeshi KOMIYA
5397664d42 Add a new extension: sphinx.ext.autodoc.typehints 2020-01-25 17:56:39 +09:00
Takeshi KOMIYA
33fcd393ab Fix #6785: py domain: :py:attr: is able to refer properties again 2020-01-25 13:55:27 +09:00
Takeshi KOMIYA
ecf38edb43 Close #7051: autodoc: Support instance variables without defaults (PEP-526) 2020-01-25 00:57:36 +09:00
Jakob Lykke Andersen
bcbb167b0d Add backslash line continuation to productionlist
Fixes sphinx-doc/sphinx#1027
2020-01-22 22:51:22 +01:00
Jakob Lykke Andersen
c084c3f124 Implement scoping for productionlist
Fixes sphinx-doc/sphinx#3077
2020-01-22 22:32:30 +01:00
Jakob Lykke Andersen
204564549c
Merge pull request #7038 from jakobandersen/cpp_role_target_checking
C++, test role target checks and fix two cases
2020-01-20 20:05:16 +01:00
Jakob Lykke Andersen
6d7ff482f6 C++, test role target checks and fix two cases 2020-01-20 19:40:00 +01:00
Takeshi KOMIYA
4e257a8084 Merge branch '2.0' into 7023_partial_listed_as_module_members 2020-01-19 23:09:46 +09:00
Takeshi KOMIYA
347e301727 Merge branch '2.0' 2020-01-19 22:47:02 +09:00
Takeshi KOMIYA
a1f6bbf800
Merge pull request #7031 from tk0miya/7023_nested_partial_functions_not_listed
#7023: autodoc: nested partial functions are not listed
2020-01-19 15:49:52 +09:00
Takeshi KOMIYA
53e38ccc30 Fix #7023: autodoc: partial functions are listed as module members 2020-01-19 15:22:09 +09:00
Takeshi KOMIYA
e908e43f67 Fix #7023: autodoc: nested partial functions are not listed 2020-01-17 09:15:45 +09:00
Takeshi KOMIYA
7906a6871e Add testcase a partialmethod not having docstring (refs: #7023) 2020-01-17 09:11:59 +09:00
Takeshi KOMIYA
ffdfb6cb87 Close #2755: autodoc: Support type_comment style annotation
Note: python3.8+ or typed_ast is required
2020-01-13 13:23:45 +09:00
Takeshi KOMIYA
9ed162921e autodoc: Support Positional-Only Argument separator (PEP-570 compliant) 2020-01-11 02:32:33 +09:00
Takeshi KOMIYA
b968bb91e9 Close #6830: autodoc: consider a member private if docstring has "private" metadata 2020-01-04 13:28:07 +09:00
Takeshi KOMIYA
0319faf8f1 Merge branch '2.0' 2020-01-01 14:40:39 +09:00
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
e628afd5cd Merge branch '2.0' 2020-01-01 11:39:46 +09:00
Takeshi KOMIYA
18e25d680d Close #6966: graphviz: Support `:class:` option 2019-12-27 22:38:10 +09:00
Takeshi KOMIYA
b6244736c4
Merge pull request #6907 from kpnr/patch-2
Non-ASCII & non utf-8 charset corruption fix
2019-12-27 01:25:50 +09:00
Takeshi KOMIYA
5640cf879f Merge branch '2.0' 2019-12-22 18:47:30 +09:00
Takeshi KOMIYA
72fa75cb9a Close #6837: LaTeX: Support a nested table 2019-12-22 18:00:58 +09:00
hkm
1ca9dacbfe Added test case for non ASCII & non UTF8 encoding Windows-1251 in test_pycode section 2019-12-15 21:47:57 +03:00
Takeshi KOMIYA
712c20a3d9 Merge branch '2.0' 2019-12-16 00:05:35 +09:00
jfbu
30b26dd6a1 LaTeX: avoid quotes and TeX ligature replacements in PDF output
Refs: #6890

The comma character is not TeX-escaped because it is frequent in general
text and escaping it would make the LaTeX output larger for only dealing
with the problem of the LaTeX-ligature of ,, into a single character.
And one there is problem with the commas in options to Verbatim from
PygmentsBridge.

The hyphen character is escaped (not in ids and URIs!) to
\sphinxhyphen{} for both Unicode and non-Unicode engines. This is needed
to work around hyperref transforming -- and --- from section titles into
EN DASH resp. EM DASH in PDF bookmarks.

https://github.com/latex3/hyperref/issues/112

Note to expert LaTeX users: if Sphinx latex user with xelatex has

- turned off Smart Quotes for some reason,

- but does want TeX ligatures and thus overrode Sphinx
latex_elements['fontenc'] default (since #6888) to this effect,

then this should be added to LaTeX preamble:

    \def\sphinxhyphen#1{-}% (\protected is now not needed)
    \let\sphinxhyphenforbookmarks\sphinxhyphen
2019-12-15 14:19:50 +01:00
Takeshi KOMIYA
7ec567b6d0 Merge branch '2.0' 2019-12-09 00:13:42 +09:00
jfbu
a0fe0aba1b Update longtable latex template 2019-12-07 00:37:33 +01:00
Takeshi KOMIYA
15c266c445 Merge branch '2.0' 2019-11-30 21:52:42 +09:00
Takeshi KOMIYA
c65243325c
Merge branch '2.0' into 6798_autosummary_emits_skip_member_event 2019-11-21 00:45:57 +09:00
Takeshi KOMIYA
6644830941 Merge branch '2.0' 2019-11-17 14:24:04 +09:00
Takeshi KOMIYA
76c7e07e8d
Merge branch '2.0' into 4683_more_translatable_toctree 2019-11-17 01:32:25 +09:00
Takeshi KOMIYA
491b19d6bb autosummary: Allows to document a member forcedly if skip-member handler returns False 2019-11-16 18:19:33 +09:00
Takeshi KOMIYA
66c3dd3adb Close #6798: autosummary: emit `autodoc-skip-member` event on generating stub file 2019-11-16 18:19:31 +09:00
Jean-François B
b070e5be52
Merge branch '2.0' into 6738_new_escape_for_unicode_latex_engine 2019-11-15 19:09:16 +01:00
Takeshi KOMIYA
5aee836dc1 Close #4683: i18n: make explicit titles in toctree translatable 2019-11-01 22:01:06 +09:00
Takeshi KOMIYA
56bbb08b2c Do not replace unicode characters by LaTeX macros on unicode supported LaTeX engines 2019-10-20 22:54:21 +09:00
Takeshi KOMIYA
93d659568d Fix #5070: epub: Wrong internal href fragment links 2019-10-20 14:32:08 +09:00
jfbu
685e3fdb49 Merge branch '2.0' 2019-08-01 17:49:24 +02:00
Takeshi KOMIYA
a498960de9 Merge branch '2.0' 2019-07-13 11:17:35 +09:00
Takeshi KOMIYA
1c088ec163 Fix #6567: autodoc: autodoc_inherit_docstrings does not effect to __init__() 2019-07-11 01:39:17 +09:00
woutdenolf
9dc9b8754d Merge with master and address code review 2019-07-08 08:29:23 +02:00
Nathan Goldbaum
a570ea6c03 Fix #6545. Strip doctests for doctest_node blocks. 2019-07-07 19:28:45 -04:00
Takeshi KOMIYA
95723aa6f6 Fix flake8 violations 2019-07-01 00:28:30 +09:00
Takeshi KOMIYA
852c061cc6
Merge pull request #6539 from tk0miya/fix_flake8_violations
Fix flake8 violations
2019-06-30 15:11:47 +09:00
Takeshi KOMIYA
8017b6ec2c Fix flake8 violations 2019-06-30 14:55:22 +09:00
Takeshi KOMIYA
35b1b5c328 Fix #6512: typo in continuation label for tables 2019-06-22 01:33:29 +09:00
Takeshi KOMIYA
b325a1de2b Merge branch '2.0' 2019-06-21 12:47:02 +09:00
Takeshi KOMIYA
efc0c19142
Merge pull request #6449 from tk0miya/6444_non_existing_urls
Fix #6444: test: replace example.com by existing page
2019-06-19 11:19:23 +09:00
Takeshi KOMIYA
5d42659e33 Merge branch '2.0' 2019-06-15 23:39:44 +09:00
Takeshi KOMIYA
e0eb86224d Merge branch '2.1.1' into 2.0 2019-06-10 22:31:18 +09:00
Takeshi KOMIYA
21be789d4d Revert "Fix #1063: autodoc: automodule directive handles undocumented module level variables"
This reverts commit 69d93c967c (without
CHANGES).
2019-06-10 21:40:11 +09:00
Takeshi KOMIYA
9f470cec6c Merge branch '2.0' 2019-06-09 01:27:34 +09:00
Takeshi KOMIYA
9b2c1c679a Fix #6444: test: replace example.com by existing page 2019-06-05 23:42:24 +09:00
Takeshi KOMIYA
301102edff
Merge pull request #6439 from mitya57/reproducible-downloads
Make generated download links reproducible
2019-06-05 22:37:58 +09:00
Dmitry Shachnev
9df6e40145 Test that downloads with the same filename are still handled correctly 2019-06-03 20:00:14 +03:00
Takeshi KOMIYA
81e2e1d971 test: Update testcase for autoclass_content and autodoc_docstring_signature 2019-06-03 23:20:33 +09:00
Takeshi KOMIYA
f7851b62e0 test: Update testcase for autoclass_content 2019-06-03 23:20:33 +09:00
Takeshi KOMIYA
42e9fd896e test: Move class inheritance samples into target.inheritance module 2019-06-03 22:34:33 +09:00
Takeshi KOMIYA
3f617a4a9b test: Update testcase for between() 2019-06-03 01:16:20 +09:00
Takeshi KOMIYA
6cbee7de3c test: Move descriptor example to independent file 2019-06-03 00:38:01 +09:00
woutdenolf
ec8656bd27 [autosummary] remove recursion limit and module/package separation 2019-06-02 16:26:40 +02:00
Takeshi KOMIYA
c4f44bdd22 Merge branch '2.0' 2019-06-02 21:17:38 +09:00
Takeshi KOMIYA
27dd8367c6
Merge pull request #6423 from tk0miya/1063_autodoc_undoc_module_variables
Fix #1063: autodoc: automodule directive handles undocumented module level variables
2019-06-02 16:20:49 +09:00
Takeshi KOMIYA
5da74898c3 Merge branch '2.0' 2019-06-02 01:09:09 +09:00
Takeshi KOMIYA
4c19ab7058 Merge commit '54d5fcfaebc3364044761d30c0fed6bd4d3052c3' 2019-06-02 01:02:54 +09:00
Takeshi KOMIYA
91fceb4b5f Merge branch '2.0.2' into 2.0 2019-06-02 00:58:46 +09:00
Takeshi KOMIYA
69d93c967c Fix #1063: autodoc: automodule directive handles undocumented module level variables 2019-06-01 23:18:37 +09:00
woutdenolf
140ae00baa
Merge branch 'master' into feature-autosummary-packages 2019-06-01 12:42:28 +02:00
Takeshi KOMIYA
e001d358d0 Add :force: option to code directives 2019-06-01 13:42:57 +09:00
Takeshi KOMIYA
ce3c5735cd Merge branch '2.0' 2019-06-01 01:45:47 +09:00
Takeshi KOMIYA
b9d7239d90 Merge branch '2.0' 2019-05-29 00:51:25 +09:00
Takeshi KOMIYA
0ea380eddd Close #6361: autodoc: Add autodoc_typehints to suppress typehints from signature 2019-05-26 00:35:24 +09:00
Stefan Wallentowitz
ac0bb5132b Fix latex figure in admonition
Using figures in an admonition produces a LaTeX error ("Not in outer
par mode."). This is because it generates a float in a float. This can
be trivially fixed by overwriting the alignment to H, which is also
what is most probably intended.
2019-05-24 16:07:13 +02:00
Takeshi KOMIYA
277aba935d Close #6325: autodoc: Support attributes in __slots__ 2019-05-22 09:56:46 +09:00
Takeshi KOMIYA
557d8d140e
Merge pull request #6365 from tk0miya/refactor_py_domain
Add :abstractmethod: option to py:method directive and support abstractmethod by autodoc
2019-05-19 23:46:34 +09:00
woutdenolf
1a67b87910
Merge branch 'master' into feature-autosummary-packages 2019-05-18 14:42:34 +02:00
Adrián Chaves
e84ba7f78a Support coverage_ignore_pyobjects in the coverage builder 2019-05-15 12:23:05 +02:00
Takeshi KOMIYA
e288999933 Close #744: autodoc: Support abstractmethod 2019-05-15 00:01:00 +09:00
Takeshi KOMIYA
d290dfd7e9 Fix #6311: autosummary: autosummary table gets confused by complex type hints 2019-05-12 14:53:25 +09:00
Takeshi KOMIYA
37a5736a1f Merge branch '2.0' 2019-05-06 21:09:43 +09:00
Takeshi KOMIYA
a765c2e4ab Add sphinx.util.inspect:iscoroutinefunction() 2019-04-23 01:40:37 +09:00
Takeshi KOMIYA
efc3405c6f Merge branch '2.0' 2019-04-14 19:35:33 +09:00
Alex Sergeev
b7f6657dd1 Address feedback 2019-04-13 22:09:01 -10:00
Takeshi KOMIYA
4aecac8251 refactor: Move subject of inspection to rootdir 2019-04-13 22:48:49 +09:00
Takeshi KOMIYA
df05d9254d Merge branch '2.0' 2019-04-07 19:29:52 +09:00
woutdenolf
6e0b0517c0 [autosummary] address code review 2019-04-07 12:00:57 +02:00
woutdenolf
4004dd5635
Merge branch 'master' into feature-autosummary-packages 2019-04-07 10:32:57 +02:00
Takeshi KOMIYA
6cb263b9c8
Merge pull request #6212 from tsanikgr/feature/autosummary_imported_members
Allow setting imported_members for autosummary in conf.py
2019-04-04 23:04:36 +09:00
Takeshi KOMIYA
61098a0ae2 Drop features and APIs deprecated in 1.8 2019-03-30 14:50:37 +09:00
tsanikgr
bec116a3b6 #5877: Allow setting imported_members for autosummary in conf.py 2019-03-27 14:19:16 +00:00
Takeshi KOMIYA
9fe962c208 Drop tests for deprecated modules 2019-03-24 21:46:31 +09:00
Takeshi KOMIYA
86f0336693 Merge branch '2.0' 2019-03-21 02:21:59 +09:00
Takeshi KOMIYA
6698bd6b3f Fix #6178: i18n: Captions missing in translations for hidden TOCs 2019-03-17 17:19:33 +09:00
Takeshi KOMIYA
332dd5d89f Merge branch '2.0' 2019-03-10 17:46:12 +09:00
Takeshi KOMIYA
4bac6b56d0 Merge branch '1.8' into 2.0 2019-03-10 16:52:51 +09:00
Takeshi KOMIYA
05d3e37ef7 Fix #6149: LaTeX: :index: role titles causes build error of LaTeX 2019-03-10 02:07:02 +09:00
Takeshi KOMIYA
7c712464bb Merge branch '2.0' 2019-03-09 18:12:56 +09:00
Takeshi KOMIYA
d7024fe996 Merge branch '1.8' into 2.0 2019-03-09 18:12:33 +09:00
Takeshi KOMIYA
f61a5f91f7 Fix test: imgconverter expects size of images fixed 2019-03-09 18:04:40 +09:00
Martin Packman
71dec3b38e Fix UnboundLocalError when building changes
Split testing of changes builder to its own test file and root.
Improve coverage a little, and add case that fails if a module
directive is included in the rst source.

Correctly handle changesets with a module declared.

Fixes https://github.com/sphinx-doc/sphinx/issues/6134
2019-03-08 13:30:27 +00:00
Takeshi KOMIYA
01f46111c5 Merge branch '2.0' 2019-03-02 18:38:24 +09:00
Takeshi KOMIYA
ac9e9c0745 Merge branch '1.8' into 2.0 2019-03-02 18:37:20 +09:00
Brendt Wohlberg
5334d96213
Merge branch 'master' into master 2019-02-28 16:49:01 -08:00
Takeshi KOMIYA
9c2e7b6798 Fix #6067: LaTeX: images having a target are not aligned even if specified 2019-02-28 02:05:21 +09:00
Takeshi KOMIYA
6c244bdd69 Fix #6067: LaTeX: images having a target are concatenated to next line 2019-02-28 02:04:12 +09:00
Takeshi KOMIYA
fb8838ee53 refactor: Use CatalogRepository instead of find_catalog_source_file() 2019-02-27 22:47:08 +09:00
Takeshi KOMIYA
2745f1e156
Merge pull request #5508 from jdknight/bugfix/allow-applying-linenos-with-post-transform
directive-code: do not force linenos value on run
2019-02-24 20:37:22 +09:00
woutdenolf
33e7b76c32
Merge branch 'master' into feature-autosummary-packages 2019-02-24 12:16:52 +01:00
woutdenolf
2a7d6081d9 [autosummary] test package recursion 2019-02-24 12:13:04 +01:00
Takeshi KOMIYA
8a391d1781 Merge branch '1.8' 2019-02-17 22:37:23 +09:00
Takeshi KOMIYA
08cd23a0bb Fix #6047: autodoc: `autofunction` emits a warning for method objects 2019-02-17 18:23:14 +09:00
James Knight
3858a62814 test: verify linenothreshold usage
Adding a unit test to verify the use of the `linenothreshold` option
provided by the `highlight` directive [1]. The included document to test
will introduce two sets of `code-block` and `literalinclude` directives
where the first entry generates contents using line numbers and the
second entry generates contents not using line numbers, respectfully.

[1]: https://github.com/sphinx-doc/sphinx/blob/v1.8.4/sphinx/transforms/post_transforms/code.py#L85

Signed-off-by: James Knight <james.d.knight@live.com>
2019-02-16 22:14:30 -05:00
Takeshi KOMIYA
5437ab61e9
Merge pull request #6074 from tk0miya/1148_autodecorator
Closes #1148: autodoc: Add autodecorator directive for decorators
2019-02-16 21:45:36 +09:00
Takeshi KOMIYA
1660269d01 Fix a test 2019-02-16 01:55:58 +09:00
Takeshi KOMIYA
686486498c Closes #1148: autodoc: Add autodecorator directive for decorators 2019-02-15 02:14:38 +09:00
Takeshi KOMIYA
3b49f9fe3d Separate htmlhelp to sphinxcontrib package 2019-02-15 01:44:32 +09:00
Takeshi KOMIYA
cd542fb2af
Merge pull request #6061 from tk0miya/reduce_warnings_of_rootcase
test: Reduce warnings on building test-root
2019-02-14 22:24:27 +09:00
Takeshi KOMIYA
9afe93d8f6 refactor: test: Remove unused settings from conf.py 2019-02-14 02:21:07 +09:00
Takeshi KOMIYA
891178e8ed test: Reduce warnings on building test-root
Note: all warnings are tested on test-warnings.
2019-02-14 02:20:55 +09:00
Takeshi KOMIYA
550c88f98c
Merge pull request #6064 from tk0miya/5636_add_autosummary_mock_imports
Closes #5635: autosummary: Add autosummary_mock_imports to mock external libraries
2019-02-14 01:13:04 +09:00
Takeshi KOMIYA
73b8d6ff33 Closes #5636: autosummary: Add autosummary_mock_imports to mock external libraries 2019-02-11 23:19:25 +09:00
Takeshi KOMIYA
ac399b3b4e refactor tests for autosectionlabel 2019-02-11 18:34:04 +09:00
Takeshi KOMIYA
7770940af8 Merge branch 'master' into 4261_autosectionlabel_max_depth 2019-02-11 17:53:50 +09:00
Takeshi KOMIYA
11a398b1b0
Merge pull request #6052 from tk0miya/5394_meaningful_annotations_for_mock
Display meaningful names in type annotations for mocked objects
2019-02-11 12:32:45 +09:00
Takeshi KOMIYA
8812131a57
Merge pull request #6022 from tk0miya/5196_linkcheck_should_check_remote_image
Close #5196: linkcheck also checks remote images exist
2019-02-11 02:05:14 +09:00
Takeshi KOMIYA
a6ef8190ce Add testcase for mocked objects in autodoc 2019-02-11 01:46:38 +09:00
Takeshi KOMIYA
3a237f7f4d
Merge pull request #6017 from tk0miya/4550_align_figures_to_center
Close #4550: All tables and figures without ``align`` option are displayed to center
2019-02-10 20:54:24 +09:00
Takeshi KOMIYA
7415f64eab refactor: htmlhelp: Generate .hhc file from template 2019-02-09 14:56:51 +09:00
Takeshi KOMIYA
1d5e3cba0e refactor: test-docutilsconf
Use options for reST parser instead of HTML4 writer's.
2019-02-09 00:49:49 +09:00
woutdenolf
4365c8436f [autosummary] tests for autosummary modules and packages 2019-02-08 16:11:29 +01:00
Takeshi KOMIYA
25027945f5 Close #4550: All tables and figures without `align` option are displayed to center 2019-02-08 01:39:41 +09:00
Takeshi KOMIYA
500bf85443
Merge branch 'master' into 5196_linkcheck_should_check_remote_image 2019-02-08 00:10:14 +09:00
Jean-François B
ed86ada661
Merge pull request #5992 from jfbu/latex_safe_graphics
LaTeX: safer image inclusion
2019-02-05 18:03:07 +01:00
jfbu
0d72052141 Merge branch 'master' into latex_safe_graphics 2019-02-05 17:46:00 +01:00
Takeshi KOMIYA
ff80d2f538
Merge pull request #5983 from tk0miya/separate_applehelp
Separate applehelp to sphinxcontrib package
2019-02-06 01:14:02 +09:00
Takeshi KOMIYA
c4397318d3 Separate applehelp to sphinxcontrib package 2019-02-06 00:44:37 +09:00
Takeshi KOMIYA
20edbe9500
Merge pull request #6015 from tk0miya/1851_omit_argument_for_code-block
Close #1851: Allow to omit an argument for code-block directive
2019-02-06 00:24:17 +09:00
Takeshi KOMIYA
f551915e9f Close #5196: linkcheck also checks remote images exist 2019-02-06 00:21:52 +09:00
Takeshi KOMIYA
d1cd72660b
Merge pull request #6012 from tk0miya/update_svgimg
Fix test: imgconverter expects size of images fixed
2019-02-04 01:53:34 +09:00
Takeshi KOMIYA
6ca669295c Close #1851: Allow to omit an argument for code-block directive 2019-02-04 01:50:44 +09:00
Takeshi KOMIYA
21fef75c3b Fix test: imgconverter expects size of images fixed 2019-02-03 23:59:15 +09:00
Takeshi KOMIYA
622a678377
Merge pull request #6010 from tk0miya/4611_show_warnings_for_duplicated_toctree
Fix #4611: epub: Show warning for duplicated ToC entries
2019-02-03 23:36:43 +09:00
Takeshi KOMIYA
b40ad9ffd4 Merge branch '1.8' 2019-02-03 23:20:26 +09:00
Takeshi KOMIYA
b950480218 Fix #4611: epub: Show warning for duplicated ToC entries 2019-02-03 22:53:30 +09:00
Takeshi KOMIYA
b7c679626a Fix #5948: LaTeX: duplicated labels are generated for sections 2019-02-03 22:33:24 +09:00
Takeshi KOMIYA
c70dfcd390 Merge branch '1.8' 2019-02-03 19:53:12 +09:00
Takeshi KOMIYA
ed3d13b939
Merge pull request #6009 from tk0miya/4611_add_testcase_for_html_style
Separate testcase for html_style to single case from root
2019-02-03 19:48:56 +09:00
Takeshi KOMIYA
705248af2f Merge branch '1.8' 2019-02-03 19:33:28 +09:00
Takeshi KOMIYA
97782c8ba1 Separate testcase for html_style to single case from root 2019-02-03 19:16:04 +09:00
Takeshi KOMIYA
36e770fe68 test: Replace SVG image by simple one
Old SVG image contains non standard tags and attributes. Therefore,
epubcheck warns it as invalid.  To avoid the warnings, this replaces it
by very simple one.
2019-02-03 19:08:28 +09:00
jfbu
669f9c3a13 LaTeX: safer image inclusion
Closes: #5956
2019-01-29 11:15:49 +01:00
Takeshi KOMIYA
20bf74c637 Separate jsmath to sphinxcontrib package 2019-01-13 14:07:12 +09:00
Takeshi KOMIYA
68c90a26f1 quickstart: Simplify generated conf.py (for latex) 2019-01-07 23:06:14 +09:00
Takeshi KOMIYA
114ff77f68 test: Omit master_doc settings from testcases 2019-01-03 10:58:42 +09:00
Takeshi KOMIYA
5428d94d24 Remove coding magic comments from tests 2019-01-02 21:53:07 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
jfbu
32d57b8637 Merge branch '1.8'
resolved Conflicts:
	doc/development/tutorials/todo.rst
	sphinx/locale/__init__.py
	sphinx/search/zh.py
2018-12-28 12:50:20 +01:00
Timotheus Kampik
221614654f
#5605 fix Chinese search index (#5611)
generate search index for Latin words correctly if search language is Chinese
2018-12-25 18:41:52 +01:00
Takeshi KOMIYA
4702086681 Merge branch '1.8' 2018-12-24 00:49:36 +09:00
animalize
cedd94c541 [1.8] htmlhelp: convert hex escaping to decimal escaping in .hhc/.hhk files (#5853)
* htmlhelp: convert hex escaping to decimal escaping in .hhc/.hhk files

.hhc/.hhk files don't recognize hex escaping, we need convert hex escaping to decimal escaping. for example: `&#x27;` -> `&#39;`.
2018-12-23 22:39:12 +09:00
jfbu
701b39328f Merge branch '1.8'
(Resolved) Conflicts:
	sphinx/texinputs/sphinxmanual.cls
2018-12-23 11:23:04 +01:00
Takeshi KOMIYA
f06e84ac4f Fix #5800: todo: crashed if todo is defined in TextElement 2018-12-22 01:10:23 +09:00
Takeshi KOMIYA
5e5bdb8a64 Remove absolute_import 2018-12-17 20:47:49 +09:00
Stephen Finucane
5a9033e5aa Specifically request Python 3
If Sphinx is Python 3-only, Sphinx's tooling should be Python 3-only
too.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:18 +00:00
Stephen Finucane
d345d0f8c1 py3: Remove (most) __future__ imports
There were two used:

- print_function
- absolute_import

Both of these are mandatory in Python 3.0 onwards [1] and can therefore
be removed...mostly. Unfortunately, mypy is still running in Python 2.7
mode, meaning we need the 'print_function' future wherever we're calling
'print' with the 'file' argument. There's also a single
'absolute_import' future that must be retained as its removal breaks a
test for as-yet unknown reasons.  TODOs are added to resolve both issues
in the future.

[1] https://docs.python.org/3/library/__future__.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:15 +00:00
jfbu
30ec4b6bba Merge branch '1.8' 2018-12-16 18:34:05 +01:00
jfbu
88a019dc99 LaTeX: allow sphinxVerbatim usage without explicit "hllines" extra setup
Fixes: #5810
2018-12-16 16:54:28 +01:00
Takeshi KOMIYA
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Takeshi KOMIYA
fd1dd13a50 refactor: Replace six.StringIO by io.StringIO 2018-12-15 21:00:38 +09:00
Takeshi KOMIYA
5f8b1ede8e refactor: Replace six.add_metaclass by __metaclass_ attribute 2018-12-15 20:06:26 +09:00
Takeshi KOMIYA
825426c841 refactor figure_wrapper() using state.inline_text() 2018-12-04 01:14:53 +09:00
Brendt Wohlberg
aacf2b8e65 Added test for correct nested class name when show-inheritance enabled 2018-12-02 08:36:31 -07:00
Brendt Wohlberg
820a71a8fc Added test for correct nested class name in inheritance diagram 2018-12-02 07:05:13 -07:00
Takeshi KOMIYA
e8ea448474
Merge pull request #5699 from tk0miya/smart_manpage_conf_py
quickstart: Simplify generated conf.py (for manpage)
2018-12-02 18:18:55 +09:00
Takeshi KOMIYA
a5e7e85e92 quickstart: Simplify generated conf.py (for manpage) 2018-12-02 17:57:20 +09:00
Takeshi KOMIYA
5e1c45355e quickstart: Simplify generated conf.py (for htmlhelp) 2018-12-02 11:30:40 +09:00
Takeshi KOMIYA
e527be396a
Merge pull request #5607 from tk0miya/smart_texinfo_conf_py
quickstart: Simplify generated conf.py (for texinfo)
2018-12-02 01:30:51 +09:00
Takeshi KOMIYA
8608102da6 Refactor metadata handling 2018-11-30 17:56:19 +09:00
Takeshi KOMIYA
4761e70c37 Merge branch '1.8' 2018-11-22 22:14:32 +09:00
jfbu
4457038550 LaTeX: compatibility with caption package, 2nd part
Ensure same vertical spaces above caption for tabular(y) and longtable
rendered tables.

Fixes: #5520
2018-11-18 00:40:28 +01:00
jfbu
7f19885641 LaTeX: compatibility with caption package
This compatibility is mainly re-instored for convenience of user to
style the fonts used for the caption, and also possibly influence the
horizontal position via "width" or "margin" option of caption package
(attention that caption package obeys the document class tacit "twoside"
option, so if left and right margins are not set-up to be the same,
positioning of caption will depend on parity of the page number).

Regarding vertical skips, for captions placed on top (which is the table
templates default and also the literalblockcappos default), this commit
ensures that the vertical spacing separating the caption last baseline
to the top of framing is governed by \sphinxbelowcaptionspace in all
these three cases: tabular(y), longtable, literal blocks; the "skip"
option of caption package is ignored for them.

The "skip" is obeyed for the spacing between an image and its caption,
which currently in Sphinx is always below the image (no customization of
the figure caption vertical placement is currently available).

If literalblockcappos is "b" (captions follow code-blocks), this commit
removes the caption-package added \abovecaptionskip, so that "skip" is
also ignored for code-blocks in this case. This looks better due to the
extra space already added by the framing of the code-block and achieves
same spacing as without caption package (presumably loaded mainly to
style the fonts used for the caption). However in future maybe caption's
package "skip" should be obeyed for "literalblock" caption type.

Fixes: 5520
2018-11-13 23:55:11 +01:00
Takeshi KOMIYA
bdaedbcbe4 quickstart: Simplify generated conf.py (for texinfo) 2018-11-11 21:57:14 +09:00
Takeshi KOMIYA
2810f77edd Merge branch '1.8' 2018-11-09 22:10:35 +09:00
Takeshi KOMIYA
feba53ff55 Fix #3080: texinfo: multiline citations are broken 2018-11-08 23:33:00 +09:00
Takeshi KOMIYA
84f781252f Fix #3080: texinfo: multiline rubric is broken 2018-11-08 23:33:00 +09:00
jfbu
16f47cded9 Merge branch '1.8' 2018-11-06 18:30:21 +01:00
Takeshi KOMIYA
e3574a6f78 Fix #3002: i18n: multiple footnote_references referring same footnote causes duplicated node_ids 2018-11-01 00:54:25 +09:00
Takeshi KOMIYA
08aadcffcd
Merge pull request #5559 from JulienPalard/text-colspan-rowspan
Working on text colspan and rowspan.
2018-11-01 00:42:02 +09:00
Julien Palard
dfa1824f19 Removing unnecessary indent. 2018-10-28 08:42:36 +01:00
Julien Palard
9b30fc938d Working on text colspan and rowspan. 2018-10-22 23:38:01 +02:00
Takeshi KOMIYA
ea03286647 test: Move autodoc_missing_imports to test-ext-autodoc 2018-10-17 11:36:11 +09:00
Takeshi KOMIYA
e7e07fd697 Merge branch '1.8' 2018-10-16 09:57:54 +09:00
jfbu
7ab09b5065 Fix #3704: wrong `\label` positioning for figures with a legend 2018-10-07 10:16:11 +02:00
Takeshi KOMIYA
973c3ffa25
Merge branch 'master' into change_master_doc_to_index 2018-09-29 21:12:40 +09:00
Takeshi KOMIYA
98648325aa Merge branch '1.8' 2018-09-22 17:16:24 +09:00
Takeshi KOMIYA
48c634e623 test: Merge py35/test_autodoc_py35.py to test_autodoc.py 2018-09-22 16:41:44 +09:00
Takeshi KOMIYA
c0fffb9e8b Fix #5432: py domain: :type: field can't process :term: references 2018-09-22 15:24:14 +09:00
Takeshi KOMIYA
522105b79b Merge branch '1.8' 2018-09-20 20:01:14 +09:00
Takeshi KOMIYA
c7f3933612
Merge branch '1.8' into 5431_warnings_for_callable 2018-09-18 23:34:33 +09:00
Takeshi KOMIYA
5c3a0e4e40 Fix #5431: autodoc: `autofunction` emits a warning for callable objects 2018-09-18 13:02:01 +09:00
Takeshi KOMIYA
9e8434f902 Fix #5436: Autodoc does not work with enum subclasses with properties/methods 2018-09-18 13:01:10 +09:00
Takeshi KOMIYA
6d55e98da1 test: Move EnumCls to target.enum package 2018-09-18 13:01:10 +09:00
Takeshi KOMIYA
02afc357ef Merge branch '1.8' 2018-09-09 19:26:48 +09:00
Takeshi KOMIYA
35e1764025 Fix #5290: autodoc: failed to analyze source code in egg package 2018-09-06 22:22:01 +09:00
Takeshi KOMIYA
342de4f0fd Merge branch '1.8' 2018-09-05 23:10:20 +09:00
Takeshi KOMIYA
abcb5bd5ec The default setting for master_doc is changed to 'index' 2018-09-04 01:14:16 +09:00
Takeshi KOMIYA
a7cab001d9 Drop APIs deprecated in 2.0 2018-09-03 00:31:33 +09:00
Takeshi KOMIYA
aee5fd04d4 Fix #5348: download reference to remote file is not displayed 2018-08-26 22:25:35 +09:00
Takeshi KOMIYA
7f52ef7512 Merge branch '1.7' 2018-08-19 02:19:06 +09:00
Lewis Haley
6e1e35c98a autodoc: allow specifying values to global arguments
Previously, users could specify a *list* of flags in their config files.
The flags were directive names that would otherwise be present in the
.rst files. However, as a list, it was not possible to specify values
to those flags, which *is* possible in .rst files.

For example, in .rst you could say

  :special-members: __init__, __iter__

And this would cause autodoc to generate documents for these methods that
it would otherwise ignore.

This commit changes the config option to instead accept a dictionary.
This is a dictionary whose keys can contain the same flag-names as before,
but whose values can contain the arguments as seen in .rst files.

The old list is still supported, for backwards compatibility, but the data
is transformed into a dictionary when the user's config is loaded.
2018-08-17 15:51:00 +01:00
Takeshi KOMIYA
c4fa1aed34 Fix #5211: autodoc: No docs generated for functools.partial functions 2018-08-17 01:24:19 +09:00
Antti Kaihola
098f37fddf Ref #5273: doctest: add test for skipif calling global setup/cleanup
Ensure that `doctest_global_setup` and `doctest_global_cleanup` are executed
before and after evaluating each `:skipif:` option.
2018-08-16 17:56:29 +03:00
Antti Kaihola
5ffc924940 Ref #5273: doctest: added a missing final newline 2018-08-16 14:09:06 +03:00
Antti Kaihola
9185c2c356 Ref #5273: doctest: add tests for the :skipif: option 2018-08-16 13:22:59 +03:00
Takeshi KOMIYA
8e56f86383 Add :rst:role:math:numref role to refer equations (Same as :rst:role:eq) 2018-08-02 01:52:40 +09:00
Takeshi KOMIYA
104bd42f51
Merge branch 'master' into refactor_highlighter 2018-07-29 11:21:36 +09:00
Takeshi KOMIYA
f969edfaa8 Fix flake8 violations on tests 2018-07-28 20:19:30 +09:00
Takeshi KOMIYA
9bb1e83668
Merge branch 'master' into refactor_highlighter 2018-07-24 01:11:57 +09:00
Takeshi KOMIYA
2bafb53179 Add testcase for trim_doctest_flags 2018-07-21 11:46:08 +09:00
Timotheus Kampik
c126067f4e #4886 add tests
to better cover the current link check ignore configuration
 behavior
2018-07-16 23:17:44 +02:00
Takeshi KOMIYA
3e57ea0a52 Merge branch '1.7' 2018-07-17 00:37:40 +09:00
Takeshi KOMIYA
52bb8e7428
Merge branch '1.7' into 3329_i18n_autosymbol_footnotes 2018-07-15 23:43:09 +09:00
Takeshi KOMIYA
aad56c0361 Fix #3329: i18n: crashed by auto-symbol footnote references 2018-07-15 20:48:39 +09:00
Takeshi KOMIYA
b1acc54cf9 Fix #5139: autodoc: Enum argument missing if it shares value with another 2018-07-15 18:53:53 +09:00
Takeshi KOMIYA
3d180f9385 Merge branch '1.7' 2018-06-21 23:23:30 +09:00
Takeshi KOMIYA
d7bf78f3ff Fix #5070: epub: Wrong internal href fragment links 2018-06-19 23:37:37 +09:00
Takeshi KOMIYA
72e60ce165 Merge branch '1.7' 2018-06-09 20:53:01 +09:00
Takeshi KOMIYA
9fc2657d7e Add :confval:html_js_files 2018-06-09 02:38:36 +09:00
jfbu
45c63a8e2d LaTeX, follow-up to PR #5012, avoid label separated by pagebreak
PR #5012 took care of this for longtable, but the problem can also arise
with tabular/tabulary and is much easier to fix.
2018-06-08 18:46:15 +02:00
jfbu
7bebdd0f97 Add tests for non-captioned table with label in latex 2018-06-08 10:18:53 +02:00
Takeshi KOMIYA
1deceda6da
Merge branch 'master' into 3606_load_mathjax_async 2018-05-28 23:04:13 +09:00
Jakob Lykke Andersen
f592483156 Add cpp:texpr role (style alternative to cpp:expr)
Simplified version of sphinx-doc/sphinx#4836,
thanks to mickk-on-cpp.
2018-05-26 17:25:41 +02:00
Takeshi KOMIYA
f3168d9894 Rename app.add_javascript() to add_js_file() 2018-05-24 23:59:49 +09:00
Takeshi KOMIYA
51962c715c Merge branch '1.7' 2018-05-23 21:41:45 +09:00
Takeshi KOMIYA
0ba5c24f5e Close #4980: latex: Improve label handling of LaTeX builder (section) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
1b5e910059 Close #4980: latex: Improve label handling of LaTeX builder (table) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
fdc0697690 Close #4980: latex: Improve label handling of LaTeX builder (code-block) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
f621fe8533 Close #4980: latex: Improve label handling of LaTeX builder (figure) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
506d4c87ef Merge branch '1.7' 2018-05-21 23:07:54 +09:00
Takeshi KOMIYA
ff3ac70c76 Fix #4973: latex: glossary directive adds whitespace to each item 2018-05-21 23:01:39 +09:00
Takeshi KOMIYA
ac523c637a
Merge pull request #4975 from tk0miya/refactor_math
Fix #4333: Enable directives and roles for math by default
2018-05-19 15:15:38 +09:00
Takeshi KOMIYA
057152e9e7 Merge branch '1.7' 2018-05-19 14:25:23 +09:00
Takeshi KOMIYA
de6f3b252e Fix #4979: latex: Incorrect escaping of curly braces in index entries 2018-05-19 14:15:02 +09:00
Takeshi KOMIYA
e675ad2ec9 Enable math_block node rendering by default (without HTML builders) 2018-05-17 00:42:22 +09:00
Takeshi KOMIYA
4e04bff4f5 Enable math node rendering by default (without HTML builders)
Nowadays, math elements (inline and block level equations) are
integrated into reST spec by default.  But, in Sphinx, they are
not enabled by default.  For this reason, users have to enable
one of math extensions even if target builder supports math
elements directly.

This change starts to enable them by default.  As a first step,
this replaces math node and its structure by docutils based one.
2018-05-15 22:27:49 +09:00
Takeshi KOMIYA
c6050a3d1e Fix latex: deeply nested enumerated list which is beginning with non-1 causes LaTeX engine crashed 2018-05-15 01:48:12 +09:00
Takeshi KOMIYA
bc19cf72c9 Merge branch '1.7' 2018-05-14 01:04:45 +09:00
Takeshi KOMIYA
e4410b6ab0
Merge branch '1.7' into 4913_literal_block_under_bullet_list 2018-05-12 22:35:55 +09:00
Takeshi KOMIYA
86f179e312
Merge pull request #4941 from tk0miya/4035_rename_viewcode_import
Rename viewcode_import to viewcode_follow_imported_members (refs: #4035)
2018-05-12 11:27:17 +09:00
Takayuki SHIMIZUKAWA
79650f5827
fix #4938: i18n doesn't handle node.title correctly (#4939) 2018-05-11 20:51:07 +09:00
Takeshi KOMIYA
5c56c99dfd Fix #4913: i18n: literal blocks in bullet list are not translated 2018-05-07 22:25:42 +09:00
Takeshi KOMIYA
4c3e757ad7 refactor: Reduce DeprecationWarnings 2018-05-07 21:37:54 +09:00
Takeshi KOMIYA
fad03ea050 Rename viewcode_import to viewcode_follow_imported_members (refs: #4035) 2018-05-07 21:22:13 +09:00
Takeshi KOMIYA
f2af9ff97c
Merge branch 'master' into fix_4035_2 2018-05-06 23:27:51 +09:00
Takeshi KOMIYA
8febb09373
Merge branch 'master' into refactor_latex_footnotes 2018-05-03 11:40:44 +09:00
Takeshi KOMIYA
cbf4ee24f9 Fix #4811: The files under html_static_path are excluded from source 2018-05-03 11:07:14 +09:00
Takeshi KOMIYA
a31e7beee7 Merge branch 'master' into refactor_latex_footnotes 2018-04-29 21:09:46 +09:00
Ashley Whetter
44da51a564 Plugins can find source code for viewcode
Fixes #4035
2018-04-24 14:45:16 -07:00
Takeshi KOMIYA
5897d45cc6 Merge branch 'master' into refactor_config 2018-04-22 18:56:04 +09:00
Takeshi KOMIYA
bafeb3eb18 Merge branch '1.7' 2018-04-22 18:19:29 +09:00
Takeshi KOMIYA
86df550c66 Fix short underline 2018-04-20 23:16:41 +09:00
Takeshi KOMIYA
6977270b66 Fix #4850: latex: footnote inside footnote was not rendered 2018-04-20 21:39:42 +09:00
Jon Dufresne
365c93f227 Update all pypi.python.org URLs to pypi.org
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-04-18 19:51:48 -07:00