Commit Graph

8547 Commits

Author SHA1 Message Date
Takeshi KOMIYA
03093acb2c Update CHANGES 2017-04-19 01:40:28 +09:00
Takeshi KOMIYA
25f4c004d8 Emit warning when fetching remote images failed 2017-04-19 01:40:17 +09:00
Takeshi KOMIYA
a5d77a8f06 Drop warning for nonlocal image URI 2017-04-19 01:40:17 +09:00
Takeshi KOMIYA
3c46c2f5ac Add ImageDownloader transform to support remote images on some builders 2017-04-19 01:40:17 +09:00
Robin Jarry
ececc4dcfe ext: enhance autodoc_mock_imports
The autodoc_mock_imports option requires to explicitly declare *every*
external module and sub-module that are imported by the documented code.
This is not practical as the list can become very large and must be
maintained as the code changes.

Also, the mocking is minimal which causes errors when compiling the
docs. For example, if you declare:

    autodoc_mock_imports = ['django.template']

And try to document a module:

    .. automodule:: my.lib.util

Which contains this code:

    from django.template import Library
    register = Library()

The following error occurs:

    File ".../my/lib/util.py" line 2
        register = Library()
    TypeError: 'object' object is not callable

Other similar errors can occur such as "TypeError: 'object' object has
no len".

To address these limitations, only require to declare the top-level
module that should be mocked:

    autodoc_mock_imports = ['django']

Will mock "django" but also any sub-module: "django.template",
"django.contrib", etc.

Also, make the mocked modules yield more complete dummy objects to avoid
these TypeError problems.

Behind the scenes, it uses the python import hooks mechanism specified
in PEP 302.

Signed-off-by: Robin Jarry <robin@jarry.cc>
2017-04-18 17:08:17 +02:00
Takeshi KOMIYA
b03b515556 Update CHANGES for PR #1767 2017-04-19 00:07:30 +09:00
Takeshi KOMIYA
618ef6492c Merge pull request #1767 from Jellby/master
Allow setting 'rel' and 'title' attributes for stylesheets.
2017-04-19 00:04:43 +09:00
Takeshi KOMIYA
4738ef878c Merge pull request #3634 from tk0miya/failed_to_load_templates
Fix fail to load template file if the parent template is archived
2017-04-18 23:58:08 +09:00
Takeshi KOMIYA
f1b387bdcf Fix fail to load template file if the parent template is archived 2017-04-18 23:22:03 +09:00
Takeshi KOMIYA
690f07fa3c Merge pull request #3388 from smheidrich/autosectionlabel_prefix_document1
Added autosectionlabel_prefix_document config option
2017-04-18 01:16:00 +09:00
Takeshi KOMIYA
83cce3ee13 Merge pull request #3629 from tk0miya/preload_builder_module
Preload builder module before init config values
2017-04-18 01:09:38 +09:00
Takeshi KOMIYA
da3e824d64 Merge pull request #3565 from tk0miya/3558_emit_warnings_for_unreferenced_footnotes
Fix #3558: Emit warnings if footnotes and citations are not referenced
2017-04-18 01:08:59 +09:00
Takeshi KOMIYA
f6d9c7d1d1 Merge branch 'master' into 3558_emit_warnings_for_unreferenced_footnotes 2017-04-18 01:08:50 +09:00
smheidrich
231976ff14 Added autosectionlabel_prefix_document config option. 2017-04-17 14:51:39 +02:00
Takeshi KOMIYA
13acfd3ce1 Rename test-image-glob to test-images 2017-04-16 21:53:01 +09:00
Takeshi KOMIYA
b39b0191a7 Fix #3351: intersphinx does not refers context 2017-04-16 18:25:21 +09:00
Takeshi KOMIYA
7d9a47d79b Preload builder module before init config values 2017-04-16 18:11:37 +09:00
Takeshi KOMIYA
9fd0205b27 Make translatable 2017-04-16 17:38:00 +09:00
Takeshi KOMIYA
bda95d967e Remove unused codes 2017-04-16 17:30:19 +09:00
Jellby
e59a8028d7 Rewrite and simplify stylesheet handling
Thanks to tk0miya's comment, I learnt one can add stuff to template
blocks, that allows a much simpler stylesheet configuration, considering
that changes at the template level will be more... well, low-level.
Hopefully this is now acceptable.
2017-04-15 17:07:33 +02:00
Jellby
1cfed262d2 Merge remote-tracking branch 'upstream/master'
Conflicts:
	tests/test_build_html.py
2017-04-15 15:54:06 +02:00
Jean-François B
c5e55c56c0 Merge pull request #3582 from jfbu/fixpdfinfo
Use hyperref to set up the PDF information dictionary (fixes #3551)
2017-04-15 10:29:04 +02:00
Jean-François B
9a68db9513 Merge branch 'master' into fixpdfinfo 2017-04-15 10:15:14 +02:00
Takeshi KOMIYA
6e7c75e642 Fix type mismatching 2017-04-14 22:58:41 +09:00
Takeshi KOMIYA
87901afb3f Update CHANGES for PR #2803 2017-04-14 22:29:47 +09:00
Takeshi KOMIYA
fcf777f37e Merge pull request #2803 from brechtm/builder_entry_point
Find builders by entry point
2017-04-14 22:16:36 +09:00
Takeshi KOMIYA
1db67af42a Fix #3624: sphinx.ext.intersphinx couldn't load inventories compressed with gzip 2017-04-14 21:57:37 +09:00
Brecht Machiels
3dd256fe7d Do not include the builder class in the entry point
- use the entry point to load the extension module in the usual way
- update the documentation to reflect this change
2017-04-14 11:01:09 +02:00
Takeshi KOMIYA
188f3c3ac3 Merge pull request #3621 from rayl/fix-typo
Fix typo in 'emphasize-lines'
2017-04-13 00:24:06 +09:00
Ray Lehtiniemi
8fef1538a5 Fix typo in 'emphasize-lines'
Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
2017-04-12 08:58:27 -06:00
Brecht Machiels
9f6da45fe5 Use load_extension() to load the builder extension 2017-04-10 13:08:34 +02:00
Brecht Machiels
ce5799a37a Builder entry points require pkg_resources/setuptools 2017-04-10 13:08:33 +02:00
Brecht Machiels
405ef96d2a Find third-party builders by entry point
A builder is uniquely identified by its name, which can be used as an
entry point in the 'sphinx.builders' entry point group. This obviates
the need to register the builder as an extension.

The built-in builders are still loaded as before. New third-party builders
should provide an entry point in their setup.py:

    entry_points={
        'sphinx.builders': [
            'mybuilder = mypackage.mymodule:MyBuilder',
        ],
    }

Like before, builders should define a setup(app) function in the
'mypackage.module' module to define configuration variables etc. It is
no longer necessary to register the builder using Sphinx.add_builder().

Existing builders can still be loaded the traditional way, by including
their module name in the extensions list in conf.py.
2017-04-10 13:04:41 +02:00
jfbu
1c4915f904 Typo in CHANGES 2017-04-08 21:54:10 +02:00
Jean-François B
ebc376157c Merge pull request #3605 from tk0miya/3594_support_block_level_raw_node_in_latex
Fix #3594: LaTeX: single raw directive has been considereed as block …
2017-04-08 21:52:36 +02:00
Takeshi KOMIYA
939f01eae3 Fix #3594: LaTeX: single raw directive has been considereed as block level element 2017-04-08 11:54:01 +09:00
Takeshi KOMIYA
f93e07404f Update CHANGES for PR #3609 2017-04-07 10:41:29 +09:00
Takeshi KOMIYA
1b5339685a Merge pull request #3609 from kalekundert/feature-ref-citation-master
Categorize "duplicate citation" warnings (on master branch).
2017-04-07 10:38:58 +09:00
Kale Kundert
ff7b9518ba
Categorize "duplicate citation" warnings. 2017-04-05 21:24:49 -07:00
Takeshi KOMIYA
1123c3bda6 Merge branch 'stable' 2017-04-04 00:38:49 +09:00
Takeshi KOMIYA
4c87bcc57e Bump version 2017-04-04 00:37:53 +09:00
Takeshi KOMIYA
5dd51a7fa4 Bump to 1.5.5 final 2017-04-04 00:34:52 +09:00
Takeshi KOMIYA
86c19bd46a Update CHANGES 2017-04-04 00:19:32 +09:00
Takeshi KOMIYA
78148e9943 Merge pull request #3602 from shirou/change-mathjax-cdn
Change MathJax CDN
2017-04-04 00:16:44 +09:00
WAKAYAMA Shirou
d6dde6ac10 change Mathjax CDN URL. 2017-04-03 13:48:16 +09:00
Takeshi KOMIYA
57019c291a Fix #3597: python domain raises UnboundLocalError if invalid name given 2017-04-02 22:55:40 +09:00
Takeshi KOMIYA
fc41f43a70 Merge branch 'stable' 2017-04-02 19:05:50 +09:00
Takeshi KOMIYA
98e8fa992e Bump version 2017-04-02 19:01:14 +09:00
Takeshi KOMIYA
f730297187 egg_info: drop --no-svn-revision option because it has been deprecated 2017-04-02 18:58:22 +09:00
Takeshi KOMIYA
f8927e9f8c Bump to 1.5.4 final 2017-04-02 18:51:30 +09:00