Commit Graph

8459 Commits

Author SHA1 Message Date
Takeshi KOMIYA
358005bd43 Show the location if warniserror enabled 2017-04-20 02:01:57 +09:00
Takeshi KOMIYA
f95b54a78e Make messages translatable 2017-04-20 01:49:17 +09:00
shimizukawa
4f620bf955 Update CHANGES refs #3644 2017-04-20 00:16:32 +09:00
Takeshi KOMIYA
36f09e83d7 Merge pull request #3643 from shibukawa/feature/fix_epub_theme_for_html5
fix #3641: Fix epub style to adopt html5 experimental writer
2017-04-20 00:13:38 +09:00
Takayuki SHIMIZUKAWA
4b2cacddf9 Merge pull request #3644 from jdemeyer/inspect_isfunction
Use inspect instead of checking types
2017-04-20 00:11:19 +09:00
Jeroen Demeyer
3e2255cd64 Use inspect instead of checking types 2017-04-19 15:38:03 +02:00
Yoshiki Shibukawa
23f55ac58d Merge pull request #3640 from shibukawa/feature/html5_enabled_for_epub_by_default
fix #3639: use html5 writer for epub by default
2017-04-19 22:22:37 +09:00
Yoshiki Shibukawa
388d5936c1 Update CHANGES
fix typo
2017-04-19 22:09:39 +09:00
Yoshiki Shibukawa
b0f395ad37 fix #3641: Fix epub style to adopt html5 experimental writer 2017-04-19 21:29:43 +09:00
shimizukawa
ac6a74ad89 Update CHANGES refs #3449 2017-04-19 21:27:41 +09:00
Takayuki SHIMIZUKAWA
6cb582fdd3 Merge pull request #3449 from njsmith/getargspec-__wrapped__
On py3, use inspect.signature for more accurate signature calculation
2017-04-19 21:21:19 +09:00
Yoshiki Shibukawa
213b2a2c79 Update CHANGES
Fix option name
2017-04-19 20:41:58 +09:00
Yoshiki Shibukawa
7262c709fe fix #3639: use html5 translator for epub by default 2017-04-19 20:00:37 +09:00
shimizukawa
de2cd652ab update CHANGES refs #2961 2017-04-19 16:28:56 +09:00
Takayuki SHIMIZUKAWA
1b6ac8b22d Merge pull request #2961 from rjarry/mock_imports
enhance autodoc_mock_imports
2017-04-19 16:20:22 +09:00
Takayuki SHIMIZUKAWA
2e13e1f0ca Merge pull request #3637 from NickVolynkin/spell-github-the-right-way
spell "GitHub" the right way
2017-04-19 13:35:18 +09:00
Nick Volynkin
3dee761727 spell "GitHub" the right way 2017-04-19 11:08:36 +07: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
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